Welcome Guest, Not a member yet? Register   Sign In
How do you plan your CI applications?
#11

[eluser]TheFuzzy0ne[/eluser]
Sounds a lot like [url="http://en.wikipedia.org/wiki/Extreme_Programming"]XP[/url] to me.
#12

[eluser]jleequeen[/eluser]
[quote author="Colin Williams" date="1242872306"]
Quote:how do you arrive at figuring out those controllers?

Typically there is one controller per resource. Let's say we're making a CMS. Depending on how you design it, let's say your resources are Pages, Users, and Categories. This lends to a Page controller, User controller, and Category controller. That's a very basic example but I hope it explains the idea. Models typically follow suit but are more burdened with the complexities of these resources.[/quote]

How would one go about thinking of these resources? Would you start by looking at your database? It seems that you would still suffer from the same problem of, well what is a homepage? is it a resource? or controller? or action within a controller? As I said in an earlier post, certain things fit really neatly into one controller per model thinking, like CRUD stuff. But it gets confusing once you leave the CRUD world to what constitutes a controller vs an action or resource. I think that's what makes this planning process frustrating.
#13

[eluser]ggoforth[/eluser]
Your supposed to plan your apps BEFORE writing code? Im in trouble.
#14

[eluser]Thorpe Obazee[/eluser]
If it's really small (almost none).

Pen and paper and then start with figuring out what the controllers will be then do the database schema. from then on, it's back and forth.
#15

[eluser]Daniel Moore[/eluser]
Check this thread. (http://ellislab.com/forums/viewthread/108694/)

It's a recent discussion of basically the same thing.

My answer will be found there.
#16

[eluser]slowgary[/eluser]
I can't help but picture the database schema while planning my apps. I don't really 'plan', I just sort of brainstorm ideas. I also do things in a resource based way. For an ecommerce site, I think about products, categories, carts, orders, users, and last but most important - coupons. Yes, you heard me right - coupons.

I'm offering a coupon to all you CI developers for a limited time only. For the next week, send me a PM and I'll send you a coupon for BUY 1, GET 1 FREE ICE CREAM CAKES! Free UPS ground shipping! Complete with a NO MONEY BACK GUARANTEE! PM me now!

I don't really plan anything further than that, I just start writing functions and see how it goes. I guess if I were blind I'd probably go jogging in Manhattan without a cane, but I find it more exciting this way.
#17

[eluser]Dam1an[/eluser]
[quote author="ggoforth" date="1242878956"]Your supposed to plan your apps BEFORE writing code? Im in trouble.[/quote]

I knew it was a matter of time till someone said that

[quote author="jleequeen" date="1242872912"]That makes sense to me, but what happens when your controllers do not neatly fit into that model = object approach. Say for instance the homepage of your application that may need to access many models. Would you create a homepage controller on it's own, since it might need to interact with a news model, a comments model, etc. It's pretty easy to understand when your talking about a crud type object that interacts with it's own model. But when thinking in terms of planning my app, Things like the homepage don't fit into that nice "object" or "resources" approach. At least not to me, unless I'm missing something which I may well be Smile[/quote]

Yes, there are always cases where it doesn't map to a single model, but these are often an after thought, such as agregating data from various models (and therefore tables)
So I would then create that page last 9although obviously think about what it needs to acheive)... and then just throw all the models you want at it Wink




Theme © iAndrew 2016 - Forum software by © MyBB