PHP Developers Network
http://forums.devnetwork.net/

Agile Design - Do's and Dont's
http://forums.devnetwork.net/viewtopic.php?f=19&t=142322
Page 1 of 1

Author:  terenceb [ Thu Feb 18, 2016 1:04 am ]
Post subject:  Agile Design - Do's and Dont's


Author:  terenceb [ Thu Feb 18, 2016 1:26 am ]
Post subject:  Re: Agile Design - Do's and Dont's

The Basic starting form I usually develop looks like the following.
Syntax: [ Download ] [ Hide ]
<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title></title>
        Javascript links
     
       Css links

    </head>
    <body>
       
    </body>
</html>
 


Because there is usually a set of defaults on both the javascript and css scripts.
I only include the standard required or default scripts that will pertain to every document throughout the site.

On any page that requires another script a link on that specific page only

ie. jqueryui is a good example I think.

Thank You

Author:  Celauran [ Thu Feb 18, 2016 7:55 am ]
Post subject:  Re: Agile Design - Do's and Dont's

Move your JS to the bottom of the body tag. Let the rest of the page load while the JS is downloading. Not a huge deal, but you will see slight performance improvements. That's not really within the scope of separation of concerns per se, just something I noticed.

Author:  Christopher [ Thu Feb 18, 2016 12:28 pm ]
Post subject:  Re: Agile Design - Do's and Dont's


Author:  terenceb [ Thu Feb 18, 2016 1:29 pm ]
Post subject:  Re: Agile Design - Do's and Dont's

I have 3 ideas I am working on at the moment.
a. Delivery Manager for local shops (ie bakeries, liquor stores etc)
b. Checklist Manager for companies that require checklists to be filled in on completion of work. (eg cleaning service) with different checksheets for different clients.
c. Mechanics , simple jobcard system for backyard mechanics.

But I don't want to push any of my ideas forward as I am more interested in learning processes than getting someone to help me write software.

Almost all systems I have been involved in have a user login page with the default registrations, password resets and logins etc.
That would be the most logical place to start i think.

I will do a css style sheet and post tomorrow for the basic site layout.
Is it better to use something like bootstrap for this or solid css?

Author:  Celauran [ Thu Feb 18, 2016 1:44 pm ]
Post subject:  Re: Agile Design - Do's and Dont's


Author:  Christopher [ Thu Feb 18, 2016 7:02 pm ]
Post subject:  Re: Agile Design - Do's and Dont's

I think you are getting a little ahead of what we can do here. Both from the practical sense of not being able to handle a lot of design/development in a forum thread, and in the Agile/XP sends of not knowing what we are implementing. The positive statement of YAGNI is to only implement what you really know what you what and how to do it. We don't need to style a form until we have a working form to style.

I think we should implement a forms manager that will handle the needs of the forms you present above. So we need to be able to create and update things like deliveries, checklists, jobcards or logins. Before you start on the stylesheet, let's determine what the requirements of this forms manager first. That is a finite project that we can do in this thread. With it you should be able to create any of the forms above and style them any way you want. But once we get the forms manager done, we will know more and we can then decide what the next most important project is.

So can you come up with a list requirements common to all the forms above?

Author:  terenceb [ Fri Feb 19, 2016 12:52 am ]
Post subject:  Re: Agile Design - Do's and Dont's

I must be honest, I am still not sure what you mean by a forms manager.

The above are separate ideas so they cannot be taken as a whole.
If I had to tackle one of them lets say an app where people can create test for anyone to take or maybe their companies training room to use.

The main forms I can think of are.(and this would grow exponentially)

a. Entry form (default) login/register bar/ site nav/latest tests/latest fixes and or updates
b. login form
c. edit user form
d. reset password form etc

common elements on all these would be

header bar(user account interaction)
nav bar(functionality)
footer bar(copyrights and support access)

common scripts could be
default css common to all forms
default jquery script link for common functionality

because I cut my teeth on codeigniter framework
I put the following folders together by default
1. app
2. sys
3. images
4. js
5. css

Not sure if this is what you meant but it is how I normally break my projects down


thanks again ;)

Author:  Christopher [ Fri Feb 19, 2016 2:19 am ]
Post subject:  Re: Agile Design - Do's and Dont's

I guess I was thinking of a further step back to the basic functioning of this page. All you showed in your previous post was really the template code (i.e., the Presentation or View). But I suspect that the code that controls this form and the code that talks to your database have similar problems. Ultimately this is all about the data. That data comes from somewhere and it ends up somewhere. In between the data is presented and managed by something. Your list was everything but the application architecture.

For example just before your last post, another member posted form code with a question about redirecting on success. Redirecting on success happens to be a Best Practice to eliminate the problem of having a form submitted multiple times. The code (viewtopic.php?p=703671#p703671) handles everything about the form in a single PHP script. Obviously much simpler that yours. So what do you think about Separation of Concerns in that person's code?

Author:  terenceb [ Fri Feb 19, 2016 7:45 am ]
Post subject:  Re: Agile Design - Do's and Dont's

Ok so If I understand you correctly the FORM MANAGER you are talking about is the engine to control the form loading etc.
Similar to what codeigniter does for me currently?

Author:  Christopher [ Fri Feb 19, 2016 1:03 pm ]
Post subject:  Re: Agile Design - Do's and Dont's

Not just that, because the Presentation side (i.e., the PHP generated HTML and Javascript/CSS that enhances the HTML) is important and where your question started. But since the original review was about Separation of Concerns, I think it makes sense to start with a blank slate and build up to the Presentation part -- which for me comes last. Also, if we build up code that anyone can run, then people can follow along.

So my statement above about Presentation part coming last might be a place to start. Obviously we need to define Concerns before we can separate them. And as we discussed earlier, Concerns are not all equal. There are reasons of both dependency and practice that determine the order you might build things.

The whole reason for the apps you list above is to deal with some data. Whether it is deliveries, checklists, jobcards or user accounts, all of the apps you listed are based on reading and writing data. So typically you start with the Domain or Model when designing. So maybe pick one of the apps you listed and define what the data is.

Author:  terenceb [ Sat Feb 20, 2016 11:55 am ]
Post subject:  Re: Agile Design - Do's and Dont's

A quick sideways question.
I am working on the form manager or needs analysis as I call it.

My sideways question is it better to pass variable values to a form using an object of stdClass or an array?

Author:  Christopher [ Sat Feb 20, 2016 2:01 pm ]
Post subject:  Re: Agile Design - Do's and Dont's


Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/