http://www.fastcompany.com/magazine/06/writestuff.html?page=0,1 wrote:Consider these stats : the last three versions of the program -- each 420,000 lines long-had just one error each. The last 11 versions of this software had a total of 17 errors. Commercial programs of equivalent complexity would have 5,000 errors.
MVC Frameworks?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: MVC Frameworks?
The Shuttle is great example, but their development practices are extremely pedantic:
Re: MVC Frameworks?
UML is NOT a design methodology. You are spouting what people 'thought' was true 50yrs ago. Now we actually know what works. There is a reason Microsoft and Google still have programmers. How can you honestly say code is "supposed" to write itself? It sure would be nice; but you're crazy. UML is generally intended to document what the code is currently like in the present, not for a big up-front design.blueyon wrote:Look another problem I have with a ZF it just continues to push people into writing sloppy code. Technically with OOP you are supposed to be able to visually design applications using UML.
If Zend is so bloated why don't you refactor it? It has tests. Go ahead, we'll wait
Since noone is on your skill level you should have no problem cutting the LOC in half without breaking any use cases right?
You remind me of those java programmers who write 4kb video games, except they did it for fun, for some reason you seem to be stuck in 1960s line of thinking and take it as a serious goal.
Let me know when the new open cart is out. Can you mail it to me on a couple 5" floppy diskettes?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: MVC Frameworks?
This is one of the points I wanted to make, and I think blueyon realizes this, but is unsure how to express it.UML is NOT a design methodology. You are spouting what people 'thought' was true 50yrs ago. Now we actually know what works. There is a reason Microsoft and Google still have programmers. How can you honestly say code is "supposed" to write itself?
Inversion of Control is a principle which has contributed greatly to making code more dynamic and thus flexible, but more difficult to follow explicitly upon first visit.
When dependencies are hard coded, their intent is obvious, whereas when a dependency is injected, it can be tricky to decompose the system into understandable parts. You basically have to start at the very beginning of an application and step through the system, as opposed to finding the single object/class of interest and having to only study that module.
Anyone coming from a static (especially compiled) language will struggle with the concept of IoC and dynamic dependencies -- as much as working in a typeless environment -- for whatever reason.
Cheers,
Alex
Re: MVC Frameworks?
This just shows how much you know. This practise is used to day in JAVA and C++ projects but still has to be picked up in PHP. PHP is still a bit behind because OOP is still new to it.josh wrote:UML is NOT a design methodology. You are spouting what people 'thought' was true 50yrs ago. Now we actually know what works. There is a reason Microsoft and Google still have programmers. How can you honestly say code is "supposed" to write itself? It sure would be nice; but you're crazy. UML is generally intended to document what the code is currently like in the present, not for a big up-front design.blueyon wrote:Look another problem I have with a ZF it just continues to push people into writing sloppy code. Technically with OOP you are supposed to be able to visually design applications using UML.
If Zend is so bloated why don't you refactor it? It has tests. Go ahead, we'll wait
Since noone is on your skill level you should have no problem cutting the LOC in half without breaking any use cases right?
You remind me of those java programmers who write 4kb video games, except they did it for fun, for some reason you seem to be stuck in 1960s line of thinking and take it as a serious goal.
Let me know when the new open cart is out. Can you mail it to me on a couple 5" floppy diskettes?
This is the only code generating UML program I can find for PHP:
http://argouml.tigris.org/tours/classgen.html
Look at this one for java?:
http://portal.humbul.ac.uk/specificatio ... MLSpec.jpg
or is this just had drawn? Do you believe in code generation now?
Object Oriented Analysis and Design
In simple terms, OOAD is the art of designing and building programs for an extended lifetime.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: MVC Frameworks?
PHP is open-source as well. OOP may be new to the language's syntax, but not to the programmers. UML is not a coding platform, it is a visual markup language for organizing ideas. There are many specifics of implementation that are foolish to place into UML. For example, communication with external entities (like a framework, for example).blueyon wrote:This just shows how much you know. This practise is used to day in JAVA and C++ projects but still has to be picked up in PHP. PHP is still a bit behind because OOP is still new to it.
Designing the classes and generating code from that is fine, but even then you must turn your class diagrams into something specific to your language, like the way a language handles strings, arrays, lists, and syntactical elements like switch statements (example: PHP allows you to use strings as cases). It takes an educated developer to properly design a system, and an expert to know the best way to implement it. PHP is a very dynamic language and, as such, is difficult to pinpoint best practice for implementation.
Hell, that's why DevNet is here.
Re: MVC Frameworks?
UML tools suck because the very essence of generating code contradicts the principles of abstraction. And there is a difference between using a code generator to stub out method declarations, and trying to write your production code with such a tool.
For instance, your UML tool cannot implement the 'power type' pattern. I suggest reading Martin / Odell Object Oriented Methods, which tells you a little bit of history on such tools & methods, and how they all fall short. That book was written in the 20 yrs ago, and they still knew back then what you are in denial about
If PHP is such a joke just why are you on PHP forums? You must like it some bit.
For instance, your UML tool cannot implement the 'power type' pattern. I suggest reading Martin / Odell Object Oriented Methods, which tells you a little bit of history on such tools & methods, and how they all fall short. That book was written in the 20 yrs ago, and they still knew back then what you are in denial about
If PHP is such a joke just why are you on PHP forums? You must like it some bit.
Re: MVC Frameworks?
i did not say php was a joke. I was just proving you wrong about code generation.
Re: MVC Frameworks?
I never have a problem with code generation in PHP. We have a home-rolled DB2 ORM that works fine, with My Generation to fall back on if we need to.
But honestly, I hate creating explicitly defined objects over and over again. Every week we run reports on the database that generate PDFs and spreadsheets on database structure that we can reference so unless there's a particular need, I just let the object properties get created on the fly based upon the row retrieval and my CRUD routines automatically handle ghost properties (as I call them).
But honestly, I hate creating explicitly defined objects over and over again. Every week we run reports on the database that generate PDFs and spreadsheets on database structure that we can reference so unless there's a particular need, I just let the object properties get created on the fly based upon the row retrieval and my CRUD routines automatically handle ghost properties (as I call them).
Re: MVC Frameworks?
Yeah, but you couldn't write an entire functioning system without writing any code
Re: MVC Frameworks?
Oh of course not. Most of my generating is for standard queries - I still had to write the original wrapper and template. And even with generated queries, I still have to write the page logic, etc. not to mention the application's behavioral framework.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: MVC Frameworks?
Why not? It depends on the type of system you are trying to build. You can actually build fairly customized, flexible applications using Drupal CCK, without writing a single line of code.Yeah, but you couldn't write an entire functioning system without writing any code
There are other application 'builders' (none of which I can remember in my hungover state) which allow clients to quickly build complete CRM/ERP/Expert systems with no coding required, customized to the unique requirements of any enterprise.
Sure it's basic, but it's a start towards making programming applications more accessible to the masses, via visual drag and drop of UML diagrams, GUI, etc.
I'm quite enthusiastic about the prospect
Cheers,
Alex
Re: MVC Frameworks?
Check out this metrics chart. http://www.pdepend.org/screenshots/full/jdepend.png
Those applications may get you up and running, within their framework, but with such tools comes inflexibility. For instance it might know about checkboxes, text boxes, dropdowns, but can it make new form elements composed of the other basic form elements? Can it make those form elements javascript / ajax aware for me? And it's likely a tool that claims to do "everything" will be harder to make it do what you want. Maybe it'll do basic CRUD, but so can a lot of regular frameworks
My argument was that of using frameworks, over code generators, except for the simplest of class skeletons. Once a code generator generates your class, you have all this duplicated code that you can't touch.. maybe fine for some projects I guess.
But most IDEs can already generates the class skeletons for you. So when you say 'code generator' I think of something that makes design choices for you, like placing lazy getters, and other "real" code other then setting and getting variables. For instance if you used such a tool to generate your ORM boilerplate stuff, and hand edited that boiler plate code, now you can't use the code generator in the future or it overwrites your changes. And it would take longer to modify a code generator then to modify your application. It's a false economy in some cases.
Those applications may get you up and running, within their framework, but with such tools comes inflexibility. For instance it might know about checkboxes, text boxes, dropdowns, but can it make new form elements composed of the other basic form elements? Can it make those form elements javascript / ajax aware for me? And it's likely a tool that claims to do "everything" will be harder to make it do what you want. Maybe it'll do basic CRUD, but so can a lot of regular frameworks
My argument was that of using frameworks, over code generators, except for the simplest of class skeletons. Once a code generator generates your class, you have all this duplicated code that you can't touch.. maybe fine for some projects I guess.
But most IDEs can already generates the class skeletons for you. So when you say 'code generator' I think of something that makes design choices for you, like placing lazy getters, and other "real" code other then setting and getting variables. For instance if you used such a tool to generate your ORM boilerplate stuff, and hand edited that boiler plate code, now you can't use the code generator in the future or it overwrites your changes. And it would take longer to modify a code generator then to modify your application. It's a false economy in some cases.
Re: MVC Frameworks?
It won't generate all code. It is not for generating html code although that can be done.
It is designed for systems that require a long life span. Your right it is slower using this type of method but if your creating a system for a bank or stock exchange it should be used.
Again though if ZF was serious about creating a OOP framework that was designed for enterprise systems, using good design practises and allowed multiple users to work on it then they should have used a Object Oriented Programming Design tool.
Your supposed to pass objects around through the constuctors so you can show a clear structure. They just pass stuff around using singletons and static methods.
Which IDE's generate code for you? I've only heard about adaptana maybe doing this for ruby but not using diagrams.
UML would not gerate a switch statement it would only generate the class and give you field where you can enter the code for each emthod you create with the class.
It is designed for systems that require a long life span. Your right it is slower using this type of method but if your creating a system for a bank or stock exchange it should be used.
Again though if ZF was serious about creating a OOP framework that was designed for enterprise systems, using good design practises and allowed multiple users to work on it then they should have used a Object Oriented Programming Design tool.
Your supposed to pass objects around through the constuctors so you can show a clear structure. They just pass stuff around using singletons and static methods.
Which IDE's generate code for you? I've only heard about adaptana maybe doing this for ruby but not using diagrams.
UML would not gerate a switch statement it would only generate the class and give you field where you can enter the code for each emthod you create with the class.
Re: MVC Frameworks?
So its ok to create duplicate code but only if you work for a bank or a stock exchange 
Also please stop using fallacies, they annoy everybody
Managers RUN AWAY when people get eccentric.
Personally I use ZF because it has the most code coverage while doing all the features I need. I know that code quality is nice, but that the best code in the world, if not covered by tests, creates a mess when you need to change it.
The lowest quality code I could find in ZF was the Zend_Db_Select object which has a few snarled methods. (that is, high cyclomatic complexity)
Also please stop using fallacies, they annoy everybody
Instead consider sayingAgain though if ZF was serious about creating a OOP framework that was designed for enterprise systems, using good design practises and allowed multiple users to work on it then they should have used a Object Oriented Programming Design tool.
And PS > I would love to see you try to bring this general attitude/outlook to a job interviewZF uses some practices I would consider bad, therefore I think the code quality is poor
Personally I use ZF because it has the most code coverage while doing all the features I need. I know that code quality is nice, but that the best code in the world, if not covered by tests, creates a mess when you need to change it.
The lowest quality code I could find in ZF was the Zend_Db_Select object which has a few snarled methods. (that is, high cyclomatic complexity)
Re: MVC Frameworks?
"So its ok to create duplicate code but only if you work for a bank or a stock exchange "
it does not create duplicate code! where did you get that idea?
" I would love to see you try to bring this general attitude/outlook to a job interview
Managers RUN AWAY when people get eccentric."
Acutally I just got a job and the managers agree with me about how bad ZF is. I also work with other people who have PHD's in software engineering like my self and agree with me that ZF is poorly designed!
THe best code in the world would not create a mess if done properly.
it does not create duplicate code! where did you get that idea?
" I would love to see you try to bring this general attitude/outlook to a job interview
Acutally I just got a job and the managers agree with me about how bad ZF is. I also work with other people who have PHD's in software engineering like my self and agree with me that ZF is poorly designed!
THe best code in the world would not create a mess if done properly.