Re: General development with MVC and Cake in particular

2010-06-11 Thread Mike Alberghini

Wow.  Are you trying to corner the market on snarky replies in this group?

Yes, the cookbook does detail the redirect method.  It buries it five 
levels deep.  It even says it is " The flow control method you'll use 
most often."  How much documentation does the Cookbook give to this, the 
most used method?  One page.  Twelve whole lines of code, comments 
included.  One browser page.  That page even makes things WORSE, by 
having conflicting info.  The syntax example at the top says the first 
parameter should be a url string.  The first code example conflicts this 
by making the first parameter an array.


So despite your best efforts to be a dick and waste peoples time, you 
managed to answer my question.  Thanks.


Mike

On 6/11/10 1:02 PM, calvin wrote:

I'll give you the benefit of the doubt that you're not just an obvious
troll. So please enlighten us on the cake-specific way to create a
multi-step action.

And the cookbook _does_ tell you how to redirect and how to create
links or buttons.

You may as well start complaining that the Cookbook doesn't have an
example forum/online store/CRM app/search engine/webmail app and a
million other applications.

The Cookbook already explains the syntax for the redirect() method. It
also gives numerous examples. If you want the Cookbook to include a
list of all the scenarios where an HTTP redirect should be used, which
has nothing to do with Cake, then you are confusing the Cookbook with
a general web development guide.

On Jun 10, 8:25 am, Windex  wrote:
   

And creating a multi-step action in Cake is no different from
creating one in a non-Cake app.
   

Except for all the cake specific ways to accomplish those tasks.



 

What's wrong with just redirecting the user to the next action/form
instead of index at the end of each action? If you need to add a back
button, then just add a link in the view as shown in the cookbook
section on the Html Helper.
   

These kind of examples are what the OP i think was referring to.
Theres the standard no framework way of redirecting, theres the ugly
hacks using cake specific functions, then there is the correct cake
method.

 

If you need to store persistent data, then
just use session variables like you would in any other application.
There's nothing here that a little common sense and basic web
development knowledge can't solve. I don't think it's reasonable to
expect the Cookbook to hold your hand and walk you through every
possible programming scenario that you might encounter in your web
development.
   

No but expanding on all those methods specific to cake used to
accomplish such tasks isn't asking to much

 

If you want web development tutorials on how to solve real-world
programming problems, then try devshed.com. It has a lot of general
PHP (and other languages) development tutorials on all kinds of real-
world web development problems, like implementing different types of
session management systems, how to implement a search engine, etc.
   

I think its clear from this post you have missed the point and you
should have just said something like 'lrn2webdesign' it would have
provided just as much information and saved you some time.
 

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
   


--
Mike Alberghini  m...@isye.gatech.edu
Web Developer404-894-4322 Phone
Industrial and Systems Engineering   404-385-2988 Fax
Georgia Institute of Technology

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: General development with MVC and Cake in particular

2010-06-09 Thread Mike Alberghini
I've built the blog, the ACL controlled version and a few other apps in 
Cake already.  The book and API docs are helpful to a point.  The point 
when they stop being helpful is when you try to figure out how to build 
multi step logic into an app.  Which is where I am.


I've already tried the documentation and found it lacking.  It's great 
at demoing some of the fundamentals, but crap at showing how to take 
Cake beyond simple single-interaction actions into useful real world 
applications.  For example, this page of the Book:


http://book.cakephp.org/view/898/A-Typical-CakePHP-Request

Manages to tell me how the logic flow of a Cake Request goes, without 
giving me any useful direction to go in.


Mike

On 6/9/2010 12:11 AM, Ed Propsner wrote:
It doesn't seem like the "blog" tutorial is really your thing but have 
you tried it? All the fundamentals are there including functions and 
how they relate to views, as well as passing data back and forth 
between MVC. It really is the best place to start and any additional 
info can be found in the book or the API.


http://book.cakephp.org/view/1528/Blog
http://book.cakephp.org/view/875/x1-3-Collection
http://api13.cakephp.org/

Once you get the basics down most people on this list are really great 
about getting you pointed in the right direction once you start making 
a mess of things 8-)


- Ed

On Tue, Jun 8, 2010 at 5:53 PM, Mike A > wrote:


I'm new to Cake and the MVC style of programming.  I've had no luck
finding a guide to best practices for programming this way, or even
guides to building anything much more complicated than a blog.  I've
been tasked with rebuilding an ancient intranet app, and I'm trying to
use Cake to do it.  I could use a bit of advice on the best way to go
about this.

Our current app is written in Fusebox 3.  It's designed to track our
staff vacation and sick days works as follows:

1.  user selects the employee who is taking time off
2.  script pulls that employees data from database A
3.  user is given a web form with the employees data filled in
4.  user selects the dates of leave and if it is charged to vacation
and sick time, then submits the form
5.  script records info to database B
6.  web page displays the employees updated sick and vacation totals

In the existing Fusebox app, I can chain a series of php pages
together (actions, views and queries) to do all the work.  Data is
passed from page to page via POST variables.

Can someone give me advice on how to do all this in Cake?  I'm trying
to figure out the best way.  Should I create a function in the
controller for each step?  How can I pass that data back and forth?

Thanks in advance for any advice you can give.

Mike

Check out the new CakePHP Questions site http://cakeqs.org and
help others with their CakePHP related questions.

You received this message because you are subscribed to the Google
Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com

To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com
 For more options,
visit this group at http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help 
others with their CakePHP related questions.


You received this message because you are subscribed to the Google 
Groups "CakePHP" group.

To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this 
group at http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en