Afficher un message
Vieux 15/06/2008, 22h51   #8
Manuel Lemos
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Does anyone flowchart their code?

Hello,

on 06/15/2008 01:58 PM William Gill said the following:
> I seem to be having a mentally bad period lately . My code is beginning
> to be terrible convoluted mess, and I shudder to think what it will be
> like to go back in a couple months and try to follow it, so I'm going
> back to basics. I need to flowchart what I'm doing. The problem is I
> can't seem to find anything that works well,and doesn't cost an arm and
> leg. I have an old copy of Smart Draw, but it's out dated and does not
> work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were
> intended to be implemented via word processors, but I haven't done one
> in 30 years.
>
> So, does anyone flowchart anymore? If so what do you use/suggest?


I think the problem is that you are focusing in code rather than in the
project.

Flow charts may be OK for trivial projects, but for larger projects you
need to specify and plan the implementation before you start or else you
will stumble into many needs that were not anticipated, and may make you
take a different approach.

Traditional good practices are proposed by RUP (Rational Unified
Project) on which you can plan your project in implementation in terms
of use cases.

Before you ever get to the code, it is useful to draw some use case
diagrams or sequence diagrams. Then you can narrow the details by
documenting the use case steps, exceptional situations that you need to
handle, pre-conditions, post-conditions, etc.

Then you finally can start modeling you application data objects and
write code to implement the use cases.

Personally I use a methodology named Use Case Mapping to depart from use
case documentation to a PHP project implementation. You may want to read
this article about the subject. If you are not familiar with concepts
such as UML, Use Cases, RUP, etc., this document gives you a good
overview on the subject as well describes a practical implementation.

http://www.meta-language.net/metastorage-example.html

As for modeling tools, I recommend any good UML tool. UML defines a set
of visual artifacts to describe your application diagrams, such as use
case diagrams, sequence diagrams, class diagrams, entity-relationship
diagrams, etc..

Under Linux I use Umbrello. Umbrello can also run on Windows and Mac
using a KDE installation for those systems.

http://uml.sourceforge.net/index.php

I think there are other free UML tools for Windows and Mac based in Java
like Poseidon.

http://www.gentleware.com/products.html

--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
  Réponse avec citation
 
Page generated in 0,07073 seconds with 9 queries