Git Product home page Git Product logo

kodekit's People

Contributors

amazeika avatar ercanozkaya avatar jebbdomingo avatar johanjanssens avatar kochen avatar magneticmg avatar mathiasverraes avatar oligriffiths avatar raeldc avatar stevenrombauts avatar stipsan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

kodekit's Issues

Improve decorator support

  • Implement dispatcher decoration by forwarding to one or more stacked controllers
  • Implement view decoration by forwarding to one or more stacked templates
  • Improve the decorator filter allow to specific element and attributes to be set

Breaking change: The Library\ViewTemplate no longer automatically adds the 'decorator' filter. To migrate: add the decorator filter if the dispatcher decoratable behavior is not used.

Refactor ViewJSON

  • Move text property routing into routable ViewBehaviorRoutable
  • Move sparse fields handling into ModelBehaviorSparsable

Improve toolbar

  • Improve toolbar data handling. Pass the toolbar data to the toolbar helper as an array and not as a json string. Encode the array in the helper and inject it in the data as attributes.
  • Improve the ControllerToolbarCommandInterface. Add additional methods

Breaking change:

  1. Specific command data is now passed through the new 'data' attribute. Commands need to be updated by moving the data array out of the attribs array.
  2. The command data is unboxed when passed, each command handler method no longer received a 'command' config option but received the command options directly.

Todo:

The default type for the toolbar dialog command has been changed to 'ajax'. The ajax dialog is currently not styled. Default styling needs to be added.

Refactor ClassLoader and ObjectManager singletons

Refactor the ClassLoader and ObjectManager and remove singletons. Instead store an instance of the class loader in the object manager and store an instance of the object manager in 'Kodekit'. Allow to set the debug and the cache through objects methods instead of setting them in the constructor.

Additionally add support for callStatic() to proxy static calls to the Kodekit class to the ObjectManager, eg Kodekit::getObject('com:foo.controller.bar');

Do not extend from ObjectSet

Do not extend ModelEntityComposite and DatabaseRowsetAbstract from ObjectSet, instead compose the objectset as private class property.

Breaking changes:

  • If you are extending from ObjectSet you can no longer access the 'data' property. To migrate your code use the API instead.
  • ModelEntityComposite::toArray() no longer flattens the whole entity collection it only returns a array representation of the current entity. To migrate your code, use iterator_to_array if you want to get a array representation of the all entities in the collection, or traverse through the collection.
  • DatabaseRowsetAbstract::toArray() no longer flattens the whole entity collection it only returns a array representation of the current entity. To migrate your code, use iterator_to_array if you want to get a array representation of the all entities in the collection, or traverse through the collection.
  • Both ModelEntityComposite and DatabaseRowsetAbstract no longer have an top() method. To migrate your code remove the top() method. The composable pattern will ensure that you always get the current entity returned.

De-couple helpers from template

Do not pass the $template object to the template helper method to allow them to be used easily outside of the content of a template or view.

Breaking changes:

  • The paginator helper link() method has been renamed to page() and the paginator.pagination now has a 'url' config option that needs to be used to create the url for each page. To migrate your code all template calls to the paginator should include array('url' => route());
  • The grid.sort helper now has a 'url' config option that needs to be used to create the url for sorting. To migrate your code all template calls to the grid.sort should include array('url' => route());

Improve command context handling

Breaking changes:

  • Controller action methods need to use the concrete a ControllerContext as typehint. To refactor your code change ControllerContextInterface to ControllerContext or ControllerContextModel
  • Dispatcher action methods need to use the concrete a DispatcherContext as typehint. To refactor your code change DispatcherContextInterface to DispatcherContext

TemplateFilterForm problem on GET forms

Query variables in the route present in the action tag of GET forms get always appended to the form regardless of the fact that they might already be there in the first place.

The result is having the the same input more than once on the next request. This can cause problems since depending on the order that they get sent (the last one overrides any precedent ones).

Fix by adding an extra check that will avoid adding hidden inputs if a selector already exists for that variable in the form.

Refactor Template package

  • Implement filters using a behaviour approach
  • Implement helpers using a behaviour approach
  • Move loading logic into render() method and remove loadString() and loadFile()
  • Add generic template filter to allow mixing different template types in the same template.

Breaking changes:

  1. TemplateInterface::loadString() and loadFile() methods have been removed and the arguments of the render() method have changed. To migrate remove calls to loadString() and loadFile() and add the content or url as the first argument to render() call.
  2. A helper no longer has a getTemplate() method. The TemplateBehaviorHelperable::invokeHelper() method passes the template object as the second parameter to the helper method being invoked.
  3. A filter no longer has a getTemplate() method. The TemplateBehaviorFilterable::filter() method passes the template object as the second parameter.
  4. ktml:block elements are considered foreign elements accoording to the html5 standard. Foreign elements need to have self-closing start tags when used without content. To migrate add a self-closing tag to empty ktml:block elements.

Allow to retrieve an object locator by name

Right now the object locator can only be retrieved by it's name, which represents the type, eg 'com'. For clarity it would be better if you could do $manager->getLocator('component') too.

HttpUrl path is not correctly encoded

HttpUrl implements a custom path encoding mechanism which does not properly escape the path. Refactor HttpUrl and harden it using rawurlencode() instead of a urlencode() or custom path encoding.

Note: since PHP5.3 rawurlencode comforms to rfc3986. (more info)

Build options in multiple stages in template listbox helper

If a listbox is created out of thousands of entities they are all fetched at the same time resulting in memory limit errors.

Instead, fetch results 100 by 100 and gradually build the options array.

Note: this removes the 'unique' property of the listbox helper which made duplicate values appear only once in listboxes. However this was not a particularly helpful option since it could be problematic when you have more than one entity using the same title.

See joomlatools/joomlatools-framework#17

Add FilesystemLocator

Implement a generic FilesystemLocator and refactor the translator and template locators to use it.

Breaking change: Resource paths are now url's and need to be parseable using parse_url.

  • Fully qualified translation paths are formatted as : com:foo/en_US.[yaml]
  • Fully qualified template paths are formatted as : com:foo/view/layout.format[.engine]

Fully qualified template paths used in import() methods need to be updated to follow the new format.

Specification pattern

Implement the specification pattern to make it easier to manage and reuse specific business rules. We use this in joomlatools/support.joomlatools.com to mostly manage subscription and download rules. Examples and implementation can be found in ticket joomlatools/support.joomlatools.com#866.

Links:

Remove ViewTemplate auto_fetch config option

Always let the view fetch the model data. In case this is not required an extending view can override the _fetchData() method to provide it's own implementation.

Breaking changes:

  • If you do not want a view to auto-matically fetch data from the model you need to override the _fetchData() method.

Add ObjectBootstrapper::getComponentManifest()

Add a getComponentInfo() method to the object boostrapper to be able to retrieve the component info from the component.json file.

Note: during the development of this issue the bootstrapper implementation has also been further optimised.

Improve ClassLoader performance

Improve the ClassLoader performance by implementing a namespace => locator map. Create the mapping on the fly when the class => path is being resolved.

Refactor View package

  • Move getRoute() into a routable behaviour
  • Make ViewAbstract class properties private
  • Add getMimetype() method to ViewInterface
  • Handling route escaping transparently

Breaking changes:

  • The View class properties are now private. To migrate your code use the getter methods as defined in ViewInterface

Refactor event handling

  • Remove onException event. Register the 'fail' dispatcher method directly with the exception handler.
  • Add a eventable behavior to emit events

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.