The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 25 posts ] 
Author Message
PostPosted: Mon May 11, 2009 1:50 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 11, 2009 1:00 pm
Posts: 4
Hi all, My name is Jonas Arnfred, and I'll be working on making joomla easier to develop components for, by automizing certain tasks and provide libraries for others. If you feel like knowing more, then take a look below.

JDevTools

Abstract

The goal of project JDevlTools is to make Joomla easier to develop for. Currently developers creating components, modules or plugins go through a lot of tedious task setting up files and writing boilerplate that can easily be automated. My aim is to provide tools for developers to automate these task, so they can focus on what's important: Creating quality web sites with Joomla.

Project

JdevTools is a project that spans two areas. First of all I intent to create utilities that automate component creation, module creation and plugin create by creating files and boilerplate code. Secondly it's my aim to create an adminList library to make it easier to for developers to create the administration.



Utilities
(DevScripts)

Most developers doing a lot of joomla developing have a bunch of scripts or files they copy around each time they want to make a new component, module or plugin. Instead of letting developers waste their time creating these tools, I intent to let Joomla save their time by providing this functionality from within joomla. I will do this by creating a common interface for a group of scripts taking care of different parts of the coding process. My aim is not to automate the process completely, or to create a kind of 'component creation in 3 easy steps'. The aim is strictly to provide simple tools for developers who already know how to code.

I imagine that these tools will consist either of different wizards of different forms where some basic information can be entered. The user can then click 'create' and all relevant actions will be taken leaving the developer ready to start coding. If a user for example wanted to create a new component, we would ask for the name of the component and the author name, and create all standard files needed for the component. Each file will be ready to work on, already containing the neccesary code pieces. Alternatively we could make the scripts more atomic and provide functionality for creating e.g. a new view for a specific component. I will take care to consider how these scripts best can be suited to help developers out there.



Library (AdminList)

The library part of the project is quite a different creature. During normal component development, the standard admin table contains a lot of repeated elements that could be benificial to abstract away in a library. 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:

Code:
    $table = new Table($items,$pagination)
    $table->col("name")->edit()
    $table->col("area_id")->db("#__areas","name")->label("Area");
    $table->col("description")->truncate(50);


And then in the tmpl:

Code:
    echo $table


This would create a table with 3 collumns (besides id and checkbox),

* One column displaying the name (that is, accessing $item[n]->name) for all n's) and being a link to the edit page (that's what the edit() method does)
* One column showing the area name and sending an sql request to the #__areas table to get the name with that specific area_id, and finally having the heading as "Area" instead of "Area_id"
* One column showing the description truncated down to around 50 characters

Then a __toString method would render the table, filling in the
information.

This way the developer wouldn't have to worry about html, table cells and other nitty gritty details that doesn't change in the administration section anyway. An important part of the design of the library is of course that it fits well with the rest of the joomla code base and is intuitive to use for a developer who is already familiar with the rest of joomla's functionality.


Benefits

With these two additions to Joomla, I think we can increase developer productivity substantially while making the components they create easier to maintain and less error prone from copying code around. Increased productivity will lead to more components, modules and plugins, which leads to more reason for webmasters to choose joomla as their cms, and more reason for developers to choose joomla as their platform.

What now?

Seeing that this project aims to help out component creators, it's important that I know how to best do so. I've developed Joomla components for some time myself, so I'm starting out with a decent comprehension of the problems to be solved, but I'm still very interested in inputs from other people who have been developing with Joomla. If you have ideas or input, feel free to write a comment.


Top
 Profile  
 
PostPosted: Mon May 18, 2009 8:14 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 11, 2009 8:00 pm
Posts: 7
As a mentor of this project I just wanted to say that we really need your ideas and thoughts about things that may be helpful for you. So feel free to write a comment.

_________________
...making developer's life better


Top
 Profile  
 
PostPosted: Mon May 18, 2009 9:13 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Thu Aug 18, 2005 2:29 am
Posts: 400
do you have a look on EasyCreateor?

http://projects.easy-joomla.org/project ... eator.html

_________________
***** Manual signatures are NOT allowed *****
Akarawuth Tamrareang / joomlacorner · http://www.joomlacorner.com · GMT +7
บริษัท มาร์เวลิค เอ็นจิ้น จำกัด http://www.marvelic.co.th
---------------------------------
Joomla! Bug Squad


Top
 Profile  
 
PostPosted: Mon May 18, 2009 5:30 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Jul 06, 2006 12:57 pm
Posts: 683
Location: Stockholm Sweden
Yes there are some tools where you can pick up some from tools in JED where Easy Creator is not there
http://extensions.joomla.org/extensions/tools/development-tools

but here
[url]
http://extensions.joomla.org/extensions ... evelopment[/url]

_________________
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben


Top
 Profile  
 
PostPosted: Mon May 18, 2009 8:58 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 11, 2009 8:00 pm
Posts: 7
Thanks for your advises. We know about such tools and furthermore we've made up a list of useful ones.

_________________
...making developer's life better


Top
 Profile  
 
PostPosted: Thu May 21, 2009 12:15 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Wed Nov 22, 2006 6:18 am
Posts: 81
My Two Cents:

Joomla Relies on alot of pre-defined default dirs that hold assets. example:
Code:
$this->getModel('some_model');


You can over ride this using various "Include some path" methods. example:
Code:
JTable::addIncludePath('some/path/here/');


If you're building a large scale website, and creating all the components from scratch, you need to direct the include path for every Model, View, Paramater, Javascript file, Css file, anything that one would want to store in a global folder.

Say i wanted to create my own "Mini Library" in the Libraries folder to hold all my site global classes or models or what have you. I think there should be a way to include a Global include.
If i type JHTML::script('somescript.js'); It will look in the 'media.system.js' folder, as well as the 'libraries.myproject.js' folder. This makes it a lot easier for me to keep up on new releases of Joomla (by replacing only certain folders, or moving my files over to a fresh install.)

Also, in the same train of thought, there should be a Global "Over-ride" for the core libraries. Take for example, the 'libraries.joomla.filesystem.file.php' file, I would like to have a 'libraries.myproject.filesystem.file.php', that will be loaded in place of the core one. Mainly so that i can keep up on fresh releases easily, and still maintain my extends. THis would also allow someone like myself the comfortablilty of building a bridge from JDatabase into an abstraction layer like Doctrine. And not have to worry about which files needed to be neglected or over written.

Some sort of Bootstrapping would make large scale sites nice and easy.

And if you want to be really cool lets tackle an abstraction layer!


Top
 Profile  
 
PostPosted: Thu May 21, 2009 9:21 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 11, 2009 1:00 pm
Posts: 4
jiggliemon,

It's an interesting idea, but I think it's a little outside the project scope.

What we are focusing on is mostly the creation of tools for creating components, so while I think you are right that file inclusion could be done smarter, it's not something I plan to be focusing on. The reason why is mostly a question of focus. We are adding some elements to joomla that would make it easier to create components, while what you are proposing is more in the avenue of changing how joomla actually works, which would be an entire different process.

Thanks a lot for your thoughts though. Keep them coming :)


Top
 Profile  
 
PostPosted: Fri May 22, 2009 9:24 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Aug 18, 2005 7:13 am
Posts: 16287
A few things I could be thinking off:

* create a simple view showing information
* create a two way view with testViewTests and testViewTest for a standard content-like page where there is a list (testViewTests), and each item is editable (testViewTest)
* Support for pagination in backend
* Easy way to add dropdown HTML lists or radio buttons through a helper file.

Are these the things you are thinking of?

_________________
Joomla forum global moderator.

Take care


Top
 Profile  
 
PostPosted: Fri May 22, 2009 11:22 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 11, 2009 8:00 pm
Posts: 7
Tonie wrote:
A few things I could be thinking off:

* create a simple view showing information
* create a two way view with testViewTests and testViewTest for a standard content-like page where there is a list (testViewTests), and each item is editable (testViewTest)
* Support for pagination in backend
* Easy way to add dropdown HTML lists or radio buttons through a helper file.

Are these the things you are thinking of?


Almost all of this will be covered by the JDevTools, but if you need to handle some specific situations you will be able to do this by adding your package with your own files and tasks to execute.

_________________
...making developer's life better


Top
 Profile  
 
PostPosted: Sat May 23, 2009 7:10 pm 
Joomla! Guru
Joomla! Guru

Joined: Mon Oct 01, 2007 11:35 am
Posts: 522
Quote:
What we are focusing on is mostly the creation of tools for creating components


If I am not mistaken, the vast majority of extensions are modules and plugins. I would also venture a guess that the developers of smaller extensions, as plugins and modules usually are, would benefit most from what you are trying to do. So, why not cater for modules and plugins?

Edit: I forgot to say well done for this initiative!


Top
 Profile  
 
PostPosted: Sat May 23, 2009 7:20 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 11, 2009 8:00 pm
Posts: 7
ewel wrote:
Quote:
What we are focusing on is mostly the creation of tools for creating components


If I am not mistaken, the vast majority of extensions are modules and plugins. I would also venture a guess that the developers of smaller extensions, as plugins and modules usually are, would benefit most from what you are trying to do. So, why not cater for modules and plugins?

Edit: I forgot to say well done for this initiative!


The reason to focus on components mostly is that they are more difficult to develop, may contain many files and tasks, and therefore need more routine work from developers. We don't see the same with modules and plugins. For them we'll only support installing and packaging. So could you please explain in more details your request?

Check the latest project specifications here: http://community.joomla.org/gsoc2009/jo ... tools.html

_________________
...making developer's life better


Top
 Profile  
 
PostPosted: Sat May 23, 2009 8:30 pm 
Joomla! Guru
Joomla! Guru

Joined: Mon Oct 01, 2007 11:35 am
Posts: 522
Just like you explained about components, modules and plugins have a preferred structure. Modules (can and should preferably) have views, and both modules and plugins can make good use of helpers. A good number of modules and plugins use the database, if not to store then to look up, just like components. Plugins have standard parts of the code in terms of the triggers. Also, they usually follow one of few patterns in terms of adding something to, or before, or using a regex for replacing something in, an article.

Components are often more complex. But, as I said, the relative complexity is probably the same. This is because components tend to be made by capable developers, whereas modules and plugins tend to be made by people with much less experience. So, let's say the need is equal.

Additionally, many components need, or are completed by, modules and plugins. Comment components, for example, work through plugins. Other components would be relatively useless without some modules to show various lists taken from the component. At least from a user perspective, where components are supplemented by modules and plugins, they should be distributed in one installer package. Why stop at helping to make someone make a component when he or she will also need to make and package modules and plugins?

So, rather than a component creator, I would love to see an extension creator.


Top
 Profile  
 
PostPosted: Sat May 23, 2009 9:01 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 11, 2009 8:00 pm
Posts: 7
ewel wrote:
Just like you explained about components, modules and plugins have a preferred structure. Modules (can and should preferably) have views, and both modules and plugins can make good use of helpers. A good number of modules and plugins use the database, if not to store then to look up, just like components. Plugins have standard parts of the code in terms of the triggers. Also, they usually follow one of few patterns in terms of adding something to, or before, or using a regex for replacing something in, an article.

Components are often more complex. But, as I said, the relative complexity is probably the same. This is because components tend to be made by capable developers, whereas modules and plugins tend to be made by people with much less experience. So, let's say the need is equal.

Additionally, many components need, or are completed by, modules and plugins. Comment components, for example, work through plugins. Other components would be relatively useless without some modules to show various lists taken from the component. At least from a user perspective, where components are supplemented by modules and plugins, they should be distributed in one installer package. Why stop at helping to make someone make a component when he or she will also need to make and package modules and plugins?

So, rather than a component creator, I would love to see an extension creator.


Well, I agree that modules and plugins can be complex and may need some automation, too. We will think what we can do for them. But if we are not able to accomplish this during GSoC it will be scheduled later on. As you may read in project specifications the JDevTools is going to be flexible and extensible.

Thanks for your thoughts we really appreciate them!

_________________
...making developer's life better


Top
 Profile  
 
PostPosted: Sat May 23, 2009 9:17 pm 
Joomla! Guru
Joomla! Guru

Joined: Mon Oct 01, 2007 11:35 am
Posts: 522
Welcome, and thanks for doing this project!


Top
 Profile  
 
PostPosted: Wed Jun 03, 2009 11:57 am 
Joomla! Intern
Joomla! Intern

Joined: Tue May 26, 2009 7:55 pm
Posts: 72
jiggliemon wrote:

Also, in the same train of thought, there should be a Global "Over-ride" for the core libraries. Take for example, the 'libraries.joomla.filesystem.file.php' file, I would like to have a 'libraries.myproject.filesystem.file.php', that will be loaded in place of the core one. Mainly so that i can keep up on fresh releases easily, and still maintain my extends. THis would also allow someone like myself the comfortablilty of building a bridge from JDatabase into an abstraction layer like Doctrine. And not have to worry about which files needed to be neglected or over written.


Assuming you are running PHP 5.2+, this is with a few exceptions very easily accomplished.

The Joomla library loader checks to see if a class exists before it loads a class, so if you beat the loader and force your class to be loaded first you can override the Joomla core libraries without actually having to touch the core files.

For example, I had someone with a very specific need, she had to make a simple change to a module layout, but between the layout template, the ability to override that template, and such finding the file to make the change to was annoying.

I wrote a simple corehack plugin, http://gothaminformatics.com/our-extens ... ing-plugin

What it does is
checks to make sure the module helper has not already been loaded[too late to run if it has]
locates the module helper library on disk
applies a quick find/replace to modify it to make some html outputting
saves the file to disk in the plugin directory
forces that file to be loaded

This overloads the core file functionality without actually changing the core files[as soon as the plugin is disabled, it goes back to running normally]

This was a quick plugin as proof of concept/to help with a particular function. The same theory could be extended but instead do some extra checking so you don't keep rehacking the file every time and only do so when the version of Joomla changes.

Now, all that said, the inclusion of an override include path, say for example add a folder called "local" to the root, and have the JImport routine check for /local/libraries/joomlafilesystem/Jfile.php and load that if it exists, otherwise load /libraries/joomlafilesystem/Jfile.php - this is how Menalto Gallery manages overriding core function instead of changing the core files. But that requires a true core hack as JImport is loaded before anything else and there is no chance to pseodo-hack it[though if you use the PECL mod that allows you to destroy classes, you can replace the JImport class with your own class]


Top
 Profile  
 
PostPosted: Thu Jun 04, 2009 8:46 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Sep 08, 2008 8:52 am
Posts: 1
Hi Guys!
Sorry for my bad english!

Now working on my universal MVC component.
Now its finished, sometimes i add some features.
Its components structure:
com_my
-models
lists.php
edit.php
save.php
-tables
....
table files
....
-views
-lists
-tpl
default.php
...
defaultN.php
view.html.php
-edit
-config
controller.php
admin.my.php
helper.php

big feature in file helper.php
in this file i coded
3 functions
controller_map()
model_map()
view_map()

they analyzy variable $a and maps to the right way


Top
 Profile  
 
PostPosted: Thu Jun 04, 2009 9:04 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 11, 2009 8:00 pm
Posts: 7
Hi jimmyneitron. I didn't understand what you requested. But if you need such universal component with your specific files, like helper.php, you will be able to substitute the default component files in JDevTools with your own ones and use them painless. Does this answer your question?

_________________
...making developer's life better


Top
 Profile  
 
PostPosted: Wed Jun 24, 2009 7:54 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Thu Jan 17, 2008 7:31 pm
Posts: 394
Just a response to your blog today about a special scripting language:

Wouldn't it be best to use XML, as this is the standard that most UML editors use? Then it would be easy to create an UML diagram of your component, and then run it through your application to have it all generated in code?

IBM has some really cool tools that does exactly this in Java and C++ - it would be so cool to have an XMl -> Joomla generator :-)

_________________
Read developer tips & and tricks about Joomla on my blog:
http://www.youcanjoomla.com


Top
 Profile  
 
PostPosted: Wed Jun 24, 2009 8:44 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 11, 2009 1:00 pm
Posts: 4
Ronze,

It's a very interesting point you are bringing up, and I can definitely see where you are coming from. I have personally decided against it for this project to keep it simple. - Both for myself, as well as for developers doing joomla components who aren't familiar with UML.

Too keep scripting in PHP makes it easier for me to custom create something that's made with Joomla in mind. This way I can incorperate the rules and structures that components and the like are restricted by, creating a scripting environment around it. I believe this makes the end product simpler for the user to use, since it's very few developers who will start UML'ing to create a component (except for a few database schemas).

But all said I still think you have a very good point, and while I've chosen against it personally, I agree that it would be pretty awesome : )


Top
 Profile  
 
PostPosted: Wed Jun 24, 2009 8:52 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Thu Jan 17, 2008 7:31 pm
Posts: 394
Hey... I understand - it would take quite an effort :-) Good luck with your project...

_________________
Read developer tips & and tricks about Joomla on my blog:
http://www.youcanjoomla.com


Top
 Profile  
 
PostPosted: Fri Jul 31, 2009 3:37 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sat Jun 14, 2008 4:07 pm
Posts: 67
Location: Kuala Lumpur, Malaysia
I mainly use Joomla to create components for backend. I can give some input for component.
One of the most common features for components are 'search and list' (testViewTests) of its tables or join-tables. It is an easy and similar process, but tedious when you need to do this for every new table created.
I like the approach used in phpBMS (http://www.phpbms.org), an open source project. you can see the demo on their website (need to login as admin). It uses 2 components to handle this.
1st component to allow developer to define 'Table Definitions' : which table, which columns, what searches, which field
2nd component to automate the display for 'search and list' based on the table definitions in the 1st component.

Hence, a standard 'search and list' display page can be created or amended within 1-2 minutes. developer does not need to create any MVC coding at all. Just create the Menu with the correct link and parameter.
All Joomla core-components can use this approach to 'search and list' too.

Tips: How to login as phpBMS admin
1) goto http://www.phpbms.org/trial/index.php, and login as any user listed.
2) after login, goto http://www.phpbms.org/trial/search.php?id=9 (cut and paste the url)
3) create a new 'admin' user. make sure 'administrator' checkbox is checked.
4) logout and login with the new admin user you have just created.
5) Explore SYSTEM > Table Definitions

I also like the approach used for 'Menu', 'Tabs', 'Saved Searches', 'Relationships'.

_________________
Raymond Ong (ongray[at]evolucent[dot]net)
Website: http://www.evolucent.net


Top
 Profile  
 
PostPosted: Fri Aug 07, 2009 11:41 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Oct 07, 2006 11:17 am
Posts: 12
Location: Ukraine
Hello,

I am a little lost this initiative, sorry, but how it's going? :)
Edit: I mean Utilities (DevScripts) as it's looks like first priority task, does not it?

Thanks.

p.s.
Great idea, in overall looks like tasks feature in symfony php framework.


Top
 Profile  
 
PostPosted: Sat Aug 22, 2009 6:13 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Apr 03, 2006 2:52 pm
Posts: 2
Hello im Joomla spanish developer and i'm very interested with your project

I wonder when you'll have a beta of this project?


Many tnx

Josep


Top
 Profile  
 
PostPosted: Sat Oct 10, 2009 10:04 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Oct 10, 2009 9:15 pm
Posts: 5
JDevTools is a great idea as do this it will be very helpful for us who think writing code is a tedious things and we want it very soon. Best of luck.


Top
 Profile  
 
PostPosted: Sun Jan 31, 2010 9:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Dec 15, 2008 5:28 am
Posts: 7
Hi,
i hope by now there is something to download, I mean it's now 2010, is anywhere I can download this great tool


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ] 



Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group