Giter Site home page Giter Site logo

rhubarb's Introduction

Rhubarb PHP

Rhubarb is an application development framework for PHP. Its focus is on allowing developers to build enterprise ready applications that are fast, scale well, allow for architectural rethinks late in the project and that maximise the potential for code reuse.

Projects and Modules

Rhubarb is a modular system. Your application only brings in the modules it needs. So if you're building an API you will use the RestAPI module but not the MVP module. This keeps the burden on autoloaders down and makes your application easier to deploy and maintain.

The main framework resides in the rhubarb project. This includes the platform bootstraps and a core set of classes called 'Crown'.

Rhubarb uses Composer to import additional packages into the solution including it's own modules. To keep our github organisation tidy other Rhubarb modules reside in projects called module.[modulename]. For example module.modelling or module.sendgrid

Contributing

Rhubarb is an open source project and as such anyone may make a contribution. Contributions can be made by forking any of the rhubarb projects and making a pull request back to the base fork.

Rhubarb has a list of senior contributors who guard and protect the values of Rhubarb and make the final decision on the merits of each pull request.

rhubarb's People

Contributors

acuthbert avatar aparnhamgcd avatar catherinegcd avatar codoherty avatar cstevenson-gcdtech avatar fpolanzangcd avatar gdalrymple avatar jandersongcdtech avatar mballantinegcd avatar miscampbell avatar niallsmyth avatar samnotsowise avatar scottmcmurray avatar simongough avatar smcgarrity avatar wmccoubrey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rhubarb's Issues

Extending AssetCatalogueProvider::storeAsset() To Accept File Streams/Strings

Following a discussion with @acuthbert, we've identified a use case where passing a file Stream or a String (to be written to a file) to storeAsset() would be worthwhile.

Currently, if a file is being generated by another process, we have to store it in a temporary location first, before passing it to storeAsset(). This feature addition would remove that requirement.

Refactor the Request objects

When I integrated the Http/HttpRequest object into the main Crown module it seemed silly to have two different Request objects in the one library. They both model the same thing so we should have a common ancestor in there object hierarchy. While we're at it, there is a PSR recommended interface for http request objects:

https://packagist.org/packages/psr/http-message

Interestingly they call it a message rather than a request. We should future proof ourselves by working with this interface if we want to stay php-fig compliant.

PSR-3 and Monolog

Our logging system needs upgraded to match PSR-3.

We should also integrate with monolog as it is the defacto standard in logging. Monolog is already PSR-3 compliant and can do lots more than ours can. However our system has one advantage which mono-log doesn't tackle - we support callbacks for the message parameter allow for CPU intensive context information to be generated only if a logger is actually about to log the message (no point calculating SQL query execution times if no logger is connected that is interested in that level of debug)

Monolog has some very interesting handlers, including ones for NewRelic and HipChat

I new with this

Hi there,

Someone can tell me how to start it without vagrant. Becouse i cant find any idex.php
i want to taste this framework
thanks

The email system isn't very flexible around templates

A project currenlty can't replace the frame of an email from a scaffold without replacing the entire email class (which must be provided for in the scaffold itself). An example is the reset password email from the authentication module.

If the template was more like a page layout class, it would allow for a more elegant way to replace email templates.

Javascript Strict Mode, Unit Tests, and Compressed Output

We need some uniformity in our javascript. From resource loaders to view bridges, the current javascript follows no standards or best practices.

I propose the following:

Strict Mode

We should be writing our javascript using strict mode. There are many good arguments for this, most related to code security. The article I've linked to here is pretty comprehensive and worth a read.

Code Quality Validation

The form of the code should comply with the js lint rule set.

Compiled Output

If we are using strict mode, we must compile the code for client consumption. This should remove the "use strict"; markers and minify the javascript. This can be achieved using the likes of Google's Closure Compiler. Strict mode is usually slower to execute, as the flag triggers additional checks in the interpreter.

Unit Tests

in line with our test coverage goals on the PHP side, we should be aiming for 100% unit test coverage for our javascript. I like the JSTestDriver system, but there are many alternatives we could look into.

Both strict mode and JSLint have full PHPStorm support. There are a number of Composer Closure Compiler packages. JSTestDriver also has a Storm plugin.

Thoughts and suggestions welcomed.

Consider localizations for both client-side and server-side

As some open source frameworks are used a crossed the world, we will need to look at localizations on both the client side and server side so that sites are. We will also need to look at WCAG and UAAG and ATAG guidelines

e.g.
on the client side uses i18n javascript to translate words or phases
using moment.js from dates

about presenter life cycle

first sorry to write here that is becouse there is no a forum where i can ask questions ..... or there is???? ok. i coming from nette framework (a really nice framework) witch is a MVP too as rhubarb. could you tell me witch is the life cicle of presenter on rhubarb??? here you have about nette .
thanks

AssetCatalogueProvider

When a project needs to store large volumes of files managing their storage and house keeping becomes a challenge. When a project has multiple different use cases all storing files in different places with different foldering conventions things can get really messy and can make for some very difficult migration problems.

Note: The easiest expression of this problem is with file storage, however going forwards I'll use the term "assets" as it allows for a larger vision of what we could do with this.

Abstracting storage of assets from the application allows developers to quickly receive, store and retrieve files without having to do any plumbing.

The name

I'm suggesting we call these things AssetCatalogueProvider. Including the work catalogue reminds us that the provider must also support house keeping and listing functions - not just storage and retrieval of single assets.

Storing an asset

$provider = AssetCatalogueProvider::getProvider($category);
$token = $provider->createAssetFromFile($filePath, $name);   // Name and category being optional
$token = $provider->createAssetFromStream($handle, $name);   // Name not optional?

Here there is a deviance from the normal provider pattern in that we pass a category to getProvider() e.g. "Agent Logos". I imagine there would be a mapping to map categories to concrete provider implementations - so you could for instance use a file based provider for one use case but an S3 provider for another. The concrete implementations could be then be swapped in the application configuration.

The token returned would information that could recover both the category and provider type to allow for staged migrations. A token would be a base64 encoded string which unencoded would look like:

PROVIDER_TYPE|CATEGORY|SOMEINTERNALDETAIL

e.g.

LocalFiles|Agent Logos|pro/property-is-us.png

Retrieving and using an asset

$asset = AssetCatalogueProvider::getAsset($token);
$asset->writeToFile("/my/local/path/".$asset->name);
$asset->getStream();
$asset->getUrl();

Note that we don't ask for a provider - the provider we need is in the token, not the current preference for a category. This allows for elegant migration of providers without having to move wholesale (which when terabytes of data are involved is not straightforward).

getAsset() returns an Asset object which will be sub classed by the appropriate provider.

Deleting an asset

$asset = AssetCatalogueProvider::getAsset($token);
$asset->delete();

Migrating assets

When introducing a new asset catalogue provider for a given category existing tokens should still be supported. It's likely however that there will be a commercial motivation to retire the old catalogue so migration must be considered.

To migration from one catalogue to another:

$asset = AssetCatalogueProvider::getAsset($token);

// Get the new catalogue provider
$provider = AssetCatalogueProvider::getProvider($category);

// Migrate the old asset into the new catalogue.
$newToken = $provider->migrateAsset($asset);

// Delete the old asset
$asset->delete();

// Store the new token

Housekeeping

Still need to give some thought to how we keep a handle on total space being used, removal of orphans etc.

HTTP status code constants should include the string description

The HTTP status code constants provided in HttpHeaders should include the string description, e.g. HTTP_STATUS_CLIENT_ERROR_NOT_FOUND = "404 Not Found" rather than just 404. I know the string description can technically be anything but that would be very uncommon, so it makes more sense to just include the whole string than making the user of the constants add the Not Found themselves.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.