bblue / ruby_old Goto Github PK
View Code? Open in Web Editor NEWCMS built with MVC and DDD
CMS built with MVC and DDD
If a presentation object is called twice due to a reroute internally within a specific view, then the template will receive a double set of variables.
Current version is modified and does not allow the class to be effortlessly updated.
Create a wrapper class for the additional functions required.
$route = $routing->route($request->getResourceName(), $visitor, $acl);
ResourceName should not be a funciton in Request. I should send the url to the route mechanism, this is however not possible due to the rewrite rules currently on the test server.
Create a configuration class instead of the constants in config.php
The class i generally very messy and must be cleaned up.
A few specific items:
Consider to remove error state system of this.
Remember to create a note in the routing mechanism to allow the registration page access even during "forced login" status.
Remember to create a note in the routing mechanism to allow the password recovery page access even during "forced login" status.
The new system must work in a few ways:
Error state is currently set via:
$this->setModelState('error', $this->createLogEntry('error description', $this->visitor));
Denne må spesielt gi 404, 403 etc. Disse settes stort sett i routing servicen.
Specifically the following functions must be updated:
route.entity.php
setResourceName()
getResourceName()
request.php
getResourceName()
routing.service.php (This is where the magic really happens)
buildRoute()
Use the same system as in the past
Design an object in the request class to handle any form. The object should get success or error state, as well as validation into the entities.
Review the file structure and propose an approach that is more suited for the application and less messy. Note that any change WILL cause a serious amount of grief since the namespace convention matches the file structure.
If(!IN_RUBY) { die(); }
Routing mechanism should make a difference between sending a 403 error due to not being logged in, and another for not having access to that area with logged in user.
This function should not require knowledge of the table name. It should instead be similar to that of the aCriterias argument (second argrument in below).
$visitor->user = new CollectionProxy(
$this->_dataMapperFactory->build('user'),
array('id' => array(array('operator' => '=', 'value' => $visitor->user_id)),
array('usergroups.id = cascade_usergroups_users.g_id')
));
The development function, such as
if(PRINT_SQL_QUERY === true)
{
echo '<pre>'; print_r($query); echo '</pre>';
}
should be more clever. I want to only show these messages if we are on the whitelisted development IPs without having to do the same check all over.
This could possibly be done via a configuration class that uses a registry pattern.
If a visitor is logging in his user id will change. We are then required to dump the stored $user entity within $visitor and reload a new user. The way this is currently done is far from optimal, and it has already caused a few bugs that are difficult to find the cause for.
Same as GitHub uses
The login/logout function will call the registerVisitor($visitor) function in the Recognition service. This is the same default function that always runs after a succesful command on the controller. This is located in the dispatcher.
/** Dispatcher.php */
$controller->registerCurrentVisitor();
Something should possibly be done to get rid of this extra registration (runs as an update).
It is not possible to use an entity within two separate entities.
For instance:
Usergroups can be collected by the use entity and the route entity, but current code is only applicable one at a time. I need to move the cascade field into the datamapper for the user and route respectively.
This is a serious bug!
Har du noen forslag til forbedringer i routing.php?
The $_approvedFields variable should also convert db names back to entity names.
The ACL service contains state, while at the same time the service factory will return a cached ACL. State is therefore transferred into any new ACL.
Check if this route is blocking a user, even when usergroup has access. This should be a value in the same database table.
Three scenarios:
Particulary if being logged out, then logging in.
If required. Current code is in bootstrap.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.