We will be creating a car module. The module will enable users to create cars. Cars will have a profile page, can be liked, can be commented on, has a profile photo, can have albums if the album module is available and can have videos if the video module is available. The module will also provide a number of car related widgets.
Begin by installing creating a local development site of SE4 (this guide will refer to it as localhost) and adding the album and video modules. Now go to Admin > Manage > Packages & Plugins > Developer SDK > Create a Package. Select "module" as type and set "car" as the module name. Fill out the other fields as you see fit.
Please note that even though the field description of the name field says "Lowercase, alphanumeric, and hyphens ("-") only" it is not advisable to use hyphens in the module name if the module will be using widgets. Let us take for example that we decided to use "my-car" as the module name. This means the modules resources will be prefixed with MyCar_. Models will be, MyCar_Model_, forms will be MyCar_Form, controllers wil be MyCar_...Controller etc. Also the module will reside in the path
application/modules/MyCar/. The problem will be the with widgets. They will be under application/modules/MyCar/widgets and the classes will be prefixed with MyCar_Widget_. SE4 will not be able to load widgets that are prefixed with camel cased module names (camel casing is caused by the hyphen). You may try to load a widget using my-car.widgetname for example but this will not work since SE4 will try to look for it in application/modules/Mycar instead of application/modules/MyCar. This could be a bug. To avoid it simply avoid the use hyphens in the module's name.
Create the module download it, and install it in the development site. Put the site in development mode. It's advisable to use firefox with firebug and firephp during development as a number of development logs appear in the firebug console when SE4 is in development mode.
Now point the browser to /car. If you can see the default page for the car module that means you are good to go to the next step.