|
PROJECT PAUSED DURING 2008 FOR PROGRAMMER'S HEALTH PROBLEM
In this tutorial we go to see how to develop an Hello World component for the Joomla 1.0.X framework. It's important to understand that you can use Joomatic Devel Mouse to develop only solutions for Joomla 1.0.X. If you want to generate projects for Joomla 1.5+ then you must download and use the Owl version, logically under a Joomla 1.5+ installation.
IMPORTANT: read also the documentation about Joomatic Devel General Concepts to understand the architecture on which Joomatic Devel has its foundation.
Before starting a new project you need to check if there is already an active configuration in the Joomatic Devel Mouse configurations system. Configurations are usefull to define locations in which Joomatic Devel Mouse will export your extensions when you request to do that. Joomatic Devel Mouse manage your projects as an internal architectures without using at all the filesystems on the server. All informations and data are contained in the database. When you want to "run" your project for a test you need first to export it. You can export it as a package to install on another Joomla system, as an already installed extension and, finally, also as an importable project to share with other developer as you. When you decide to export your project as an already installed extension this means that Joomatic Devel Mouse must generate all the necessary files and database structures, relative to your project, and after also install the new extension under a Joomla installation where can subsequently test its functionality.
Using configurations you can inform Joomatic Devel Mouse about the parameters to access your target Joomla installation for all the exporting process. Paramenters are divided into FTP and MySQL ones. You can have as many configurations as you want but only one of them can be active. Then, before starting a new project or exporting an already existing one, you need to check if there is a configuration and if that one point where you want to install the new generated extension.
IMPORTANT: before working with Joomatic Devel Mouse get the habit to check the Components->Joomatic Devel->Software updates to get the last changes from the principal Joomatic server. This is a very important operation considering that Joomatic Devel Mouse is constantly developed for bugs corrections and improvements.
Now that you have understood the configurations and updates concepts we can proceed next.
Open the projects list using the Components->Joomatic Devel->Projects management link. You can use the New button on the toolbar to start a new project.
Compile all fields with the data relative to your project. Try to use the following data to obtain a Hello World example:
Title = write "Hello World" here.
Typology = select the COMPONENT option here.
Joomaticization = select the LOW JOOMATICIZATION option here.
Name = leave this field blank because system will generate automatically what it needs. You will use this field only when you become more expert.
Creation Date Timestamp = automatically created by the system.
Author = specify your name here.
General copyright notice = specify your license here. For example, if you want to use the GPL 2.0 license, you can write the text below reported:
This component is released under the GNU/GPL Ver. 2.0 License that are available from http://www.gnu.org/licenses/old-licenses/gpl-2.0.html and from the principal directory of this package.
Author email = specify your email here.
Author site URL = specify your site URL here.
Version = specify your project version number here. For example you can write 0.0.1.
Description = specify the description of your project here. For example you can write the text below reported:
This is an Hello World component to demonstrate the functionalities of Joomatic Devel Mouse.
Copyright notice that will be included at beginning of each PHP Code files = specify the copyright text that will be included in each files. For example you can write the text below reported:
/*** hello_world Component (Mouse Version)
* @ Copyright (C) 2007 Your Name
* @ All rights reserved
* @ hello_world Component is Free Software
* @ hello_world Component is released under the GNU/GPL Ver. 2.0 License
* @ License is available on http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
**/
Use the Save button to store the informations. Joomatic Devel Mouse is very verbose and communicate the results of all executed operations with appropriate messages. Read always the content of each message to understand what is happening and after use the It's ok button to go back.
Now your project is ready to be developed.
Click on the DEVELOP THIS COMPONENT link to start manipulating the project.
You will be pointed to the development panel where you can find the [sceneries, activities, events] management system as well as the [data-units, model-units, controller-units, view-units, toolbar-units], [additional-files] and [menu-voices] ones.
Ok, now we can start to implement our project. First of all we need to create a scenery that describe the "use case" that we want to develop. We will call this scenery "Hello World Messages Management". To do that click on the New scenery link.
Compile all fields with the data relative to the scenery. Try to use the following data to obtain an "Hello World Messages Management" example:
Title = write "Hello World Messages Management" here.
Name = leave this field blank because system will generate automatically what it needs. You will use this field only when you become more expert.
Scope = select the ADMINISTRATIVE (BACK-END) option here.
Use the Save button to store the informations.
When you have done you will pointed again to the principal development panel where you will find the new scenery already selected.
Now we must create an activity. To do that click on the New activity link.
Compile all
fields with the data relative to the activity. Try to use the following
data to obtain an "Hello World Message Visualization" example:
Title = write "Hello World Message Visualization" here.
Name = leave this field
blank because system will generate automatically what it needs. You
will use this field only when you become more expert.
Scope = automatically selected by the system.
Typology = select the MANUAL option here. This option is aimed to inform the system about how the MVC blocks, relative to the activity, will be implemented: through Manual, Managed or Generated modality.
Visibility = select the VISIBLE option here. This option is aimed to inform the system if the activity will generate a graphical output or not, therefore a view function will be called or not.
Use the Save button to store the informations.
When you have done you will
pointed again to the principal development panel where you will find
the new scenery already selected.
Now we must create an event that will trig our activity. To do that click on the New event link.
Compile all
fields with the data relative to the event. Try to use the following
data to obtain an "Application Start" example:
Title = write "Application Start" here.
Name = leave this field
blank because system will generate automatically what it needs. You
will use this field only when you become more expert.
Scope = automatically selected by the system.
Default = select the YES option here. This option is aimed to inform the system about what event must be generated when the principal "Hello World" component menu will be clicked. A default event will be also the one that will be automatically generated when the system cannot detect a valid event to process.
Use the Save button to store the informations.
When you have done you will
pointed again to the principal development panel where you will find
the new scenery already selected.
To finish this first step we need to connect the just created event with the "Hello World Message Visualization" activity. To do that click on the "CONNECT" button that you will find on the principal development panel, near the events selector.
Now we know for sure that, when the event "Application Start" will happen, the correspondent "Hello World Message Visualization" will be triggered. But what do the activity do? We must implement the code for the activity and Joomatic Devel will help us to do that using an MVC approach.
To reduce the complexity of this Hello World example we will not use the Data Units for now. Data Units are the atomic blocks capable of representing the tables in the databases.
We must create a Model Unit to simulate the retrieving of a message from the database. In this example, as already said before, we do not really use the database and therefore the code of the Model Unit will be only an hard coded example. Use the New Model Unit link to create a new block.
Compile all
fields with the data relative to the model unit. Try to use the following
data to obtain a "Get A Message" example:
Title = write "Get A Message" here.
Name = leave this field
blank because system will generate automatically what it needs. You
will use this field only when you become more expert.
Typology = select the
MANUAL option here. This option is aimed to inform the system about how
the Model Unit will be implemented: through
Manual or Managed modality.
Use the Save button to store the informations.
When you have done you will
pointed again to the principal development panel where you will find
the new scenery already selected.
Now we must create a Controller Unit that will use our just created Model Unit. To do that click on the New controller unit link.
|