tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/813-best-way-to-structure-your-robot-legs-projectsRobotlegs: Discussion 2013-05-20T13:54:50Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-04-27T03:22:28Z2013-04-27T03:22:29ZBest way to structure your robot legs projects<div><p>Hi all, Just wanted some best practise advice on how I should
structure my robotlegs projects, My project is starting to get
bigger and Im wondering about how most people structure their
projects.</p>
<p>Im currently seprating everything based on each main view of my
application<br>
eg. My app has 5 views<br>
Login View<br>
Job View<br>
Client View<br>
Vehicle View<br>
Worker View</p>
<p>So my structure is as follows<br></p>
<pre>
<code>com.cavej03.appName +
+ Controller
+ login
+ worker
+ client
+ worker
+ vehicle
+ Event
+ login
+ job
+ client
+ worker
+ vehicle
> Model
+ etc...
> Service
+ etc...
> View
+ etc...</code>
</pre>
Its somewhat tidy but I still think someone who is looking at my
code is gonna freak....
<p>Can anyone recommend common practise, also when i comes to
naming commands and events some advice here also..</p></div>Joshua Cavetag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-04-27T04:54:30Z2013-04-27T04:54:30ZBest way to structure your robot legs projects<div><p>I started off structuring my apps that way. However, as my
projects got<br>
larger I found that structure to be in need of improvement. My
preferred<br>
structure, taken from posts in these forums, is to actually break
it down<br>
in the opposite way. I first divide packages by "module" (I.e. by
what it<br>
does in the app, such as login, client, worker, etc in your
example). Then<br>
within those packages I place my individual views, commands,
events,<br>
models, etc., each in their own package.</p>
<p>Paul</p></div>Paul Robertsontag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-04-27T04:57:34Z2013-04-27T04:57:36ZBest way to structure your robot legs projects<div><p>Currently doing that exact process.... Thanks for the reply..
First time robotlegs user.. Im loving it... such a cool fun way to
program.. makes me feel boss!</p></div>Joshua Cavetag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-04-27T11:24:02Z2013-04-28T09:35:10ZBest way to structure your robot legs projects<div><p>+1 for Paul’s suggestion</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-04-27T11:31:13Z2013-04-27T13:08:58ZBest way to structure your robot legs projects<div><p>where do you put your events</p></div>Joshua Cavetag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-04-27T13:22:40Z2013-04-27T13:22:40ZBest way to structure your robot legs projects<div><p>Some people do it like this:</p>
<p>--controller</p>
<p>------commands</p>
<p>------events</p>
<p>--model</p>
<p>------vos</p>
<p>------events</p>
<p>--service</p>
<p>------events</p>
<p>--view</p>
<p>------events</p>
<p>Other people do it so:</p>
<p>--controller</p>
<p>--events</p>
<p>--model</p>
<p>--service</p>
<p>--view</p>
<p>I’m putting the events into a single events folder under
controller. I find it to be much more clear and easy to find
them.</p>
<pre>
--loginModule
----configs
--------LoginContext.as
--------MediatorsConfig.as
--------ModelsConfig.as
--------ServicesConfig.as
--------CommandsConfig.as
----controllers
--------commands
----------------LoginCommand.as
--------events
----------------LoginEvent.as
----------------AnotherEvent.as (just for the sake of an example)
----models
--------interfaces
----------------ILoginModel.as
-------- LoginModel.as
--------vos
----------------LoginVO.as
----services
-------- interfaces
----------------ILoginService.as
--------RemoteLoginService.as
--------LocalLoginService.as
----views
--------components
----------------LoginView.mxml
----------------RegisterUserView.mxml
--------mediators
----------------LoginMediator.as
----------------RegisterUserMediator.as
</pre>
<p>Note: I prefer the plural form for my folders’ names, but
that's just a personal preference, nothing more. I just think it is
important to be consistent, using either singular or plural names
for all your folders/packages. Some might say that naming your
folders model, view, controller (singular) is the way to go,
because it would reflect the MVC pattern. Also, there are numerous
articles and discussions on the internet(s!) promoting the singular
form for package names for various reasons, some of them being very
good. But the dispute about singular vs. plural package-names has
not ended yet ;)</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/265928572013-05-16T09:36:13Z2013-05-16T09:36:13ZBest way to structure your robot legs projects<div><p>I'm closing this for now, if you have any more questions let us
know!</p></div>creynders