| Project Specification for JDevTools |
|
JdevTools aims to help developers create components. A lot of tasks during extension development are very repetitive tasks such as setting up files, creating database tables and writing classes for the mcv structure. With JDevTools, it will be easy to automate this process, either by creating simple scripts taking care of the process, or by using scripts that are already made. JDevTools will include tools for:
How it will work The purpose of JDevTools is to create an environment where developers easily can execute scripts, make their own scripts and use other peoples scripts. There will continuesly be new scripts added, but anyone should with ease be able to write their own. The base of JDevTools will be an application (like the joomla installer) which will take the user through 4 steps in order to create the component:
This will enable a developer to create the base for a component by clicking a couple of times, providing some input and click run. It's important to notice that this will not create a working component on it's own. It just creates an easily extendable base for developing a component. A script is a set of tasks, like creating all the files for a component, or registering a component in the database. With the project I will create some basic scripts, but the main goal is to leave the scripting process transparent so developers easily can extend existing scripts or create their own. Each script that can be run in JDevTools is basically a collection of tasks we provide with an api. The tasks are simple, atomic and cover every single aspect of creating a component.
Code creation (adds code to a file)
Database setup
Packaging
It's important to understand that this is not neccesarily an exhaustive list. During the development, some tasks might be split in to two atomic tasks, if this make more sense, or gathered to one. The important part is to make a solid foundation for the scripts. Not so much exactly which tasks are included or not, as new ones always can be added later on. I will be open to suggestions under the development process, and I expect to gain a lot of inspiration for new tasks the moment I get my hands dirty. The AdminList library As an addition to the scripts, JDevTools will also provide and use a library for making admin tables easier to create. The library will make it easier to create tables by integrating data filtering, ajax processing of common tasks like publish/unpublish and quick edit to change data on the fly. To construct an admin table should be a question of specifying the content of each collumn, and then letting joomla take care of the rest. Practically speaking a possible way of doing it could look like this: $table = new Table($items,$pagination)
$table->col("name")->edit() $table->col("area_id")->db("#_ $table->col("description")-> And then in the tmpl: echo $table
This would create a table with 3 collumns (besides id and checkbox),
Then a __toString method would render the table, filling in the information. Final thoughts The main focus with this project is to provide a base that's flexible and extensible. Nothing get's complety right the first time around, but with JDevTools I hope that a strong foundation will make it possible for us to gradually achieve something very useful. This means practically speaking that everything must be coded with extensibility in mind. Tasks must follow common procedures and be easy and intuitive to add. Scripts must be simple to understand and easy to create. Libraries and apis must be straightfoward to use and easy to extend. With a strong foundation I'm very confident this can be a very valuable tool for web developers using joomla. |