SitePoint Sponsor |
|
User Tag List
Results 76 to 100 of 274
-
Nov 12, 2004, 18:48 #76
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by MickoZ
Originally Posted by JNKlein
Now, if it were arranged so that I only ever accessed the User class, and if the code within that class decided that some database access were required and it accessed the UserMapper class without me even being aware of it, then that would be a step in the right direction.
But hang on a minute! isn't that what I already have in my design? Except that in my case I don't have a UserMapper class, I have a Data Access Object. Also I don't have a separate Mapper class for each entity, but I do have a single data access object for the entire application. Somehow my design seems more efficient.
-
Nov 12, 2004, 19:00 #77
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by MickoZ
The worse thing that an aspiring programmer can do it pick a pattern because it looks 'cool' and try to implement it without having the original problem that the pattern is trying to solve. If you write code that works there is no point in changing it just so that it follows the pattern, because by changing it you may be introducing bugs or inefficiencies.
You should be aware of patterns, but you need to know when a particular pattern can help solve a problem instead of introducing new ones. That takes skill and experience. A simple rule of thumb is this: Don't bother with a pattern unless you have a problem which that pattern is designed to solve.
-
Nov 12, 2004, 19:03 #78
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by MickoZ
Write code. Lot's of it. Never waste an opportunity to express design in code form. Whenever I respond to Sitepoint posts for example I try to include code snippets. It's another chance to write stuff in an area I many never work in, and also others can critique it and suggest counter examples.
The basic mechanics of OO you get just by doing. It's sufficient to to have a few classes in a sea of procedural code to start to aclimatise. Don't underestimate this process of sinking into a new paradigm. After all learning data modelling or logic programming is just as strange at first, but everybody expects to learn OO in one go. It sounds like you are already past this.
Refactoring is the next step (the book by Martin Fowler is a must have). This is the technique that allows you to get things wrong so that you can then get them right. The power of OO is it's flexibility so why not leverage that every second you are writing code. By making and fixing lots of little mistakes in a short time frame you learn fast. The big impact of this book comes about three weeks after you read it (not all of it, just some will do). It clicks and you jump a level.
Patterns are tricky. Gather as many of them as you can at all times then, once you are actually programming, forget them. A pattern is like a tool in a toolbox. You don't start making a chair by thinking how can I make a chair with a drill, you just start making the chair and the point when you need the drill you subconciously grab for it. After a while the core GOF patterns just start to meld together into a style of thinking.
Do as much of this learning with other people as you can. If you can manage it, try pair programming. If you cannot, find ways of getting code reviews. They are a frequent feature of this forum. You won't get definitive answers (and only you will know what's best for you), but you'll get some eye openers. Try to do design in groups around a whiteboard. If you work alone then group design sessions will be your biggest loss. Join a user group or do anything you can to correct this.
Enterprise patterns (Martin Fowler again and also Domain Driven Design by Eric Evans) are easier to grasp. Keep these catalog books around when you are working. It is only necessary to skim these books at first. You want a memory jogger when you come accross a related problem in your code.
Always focus on the immediate problem and try to write the minimum amount of code to solve just that problem. Don't worry about reuse or other meta issues, you will just log jam your brain. Hack if necessary and then design it later by refactoring. Also look at minimal designs from the point of view of coding techniques. Feature driven design, CRC cards and Agile Modelling are all such techniques. Oh yeah, look up YAGNI.
Have a look at unit testing and Test Driven Design (Kent Beck).
OO allows redesign as you go. Leverage this against difficult problems by solving just one feature at a time. Get that working and then add another and refactor. Iterative development works well with OO and your project managers will be happier. Adding flex points (the ability to change the software at build or run time) is treated the same way. Scrum, RUP and XP are built around this.
Have a look around the C2 wiki.
Collect these books: Refactoring (Fowler), Design Patterns (Gamma, Helm, Johnson, Vlissides), Patterns of Enterprise Application Architecture (Fowler), Thinking in Java (Eckel, but I've not yet read it), Agile Software Development (Martin), Roles, Responsibilities and Collaborations (Wirfs-Brock), Domain Driven Design (Evans), The Pragmatic Programmer (Hunt, Thomas), Test Driven Development by Example (Beck).
Sleep a lot.
Talk to lot's of people.
Have fun.
Actually, if you just manage that last one, the others will follow.
yours, MarcusLast edited by lastcraft; Nov 12, 2004 at 20:19. Reason: Forgot the Pragmatic Programmer
Marcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Nov 12, 2004, 19:23 #79
- Join Date
- Jul 2004
- Location
- Canada, Qc
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks lastcraft, interesting ;-)
I liked the Sleep alot.
I also tried CRC card sometime ago... I liked it.
Actually for working, I work daily in a place they use Java, but my project is not 100% object oriented (it is mostly SQL driven for now, but I might look to refactor a part of the code, I am sure it can be cleaner, it always can!). And beside my day job, I do some contract in PHP, my client wish to hire me full time at high price... maybe working too much sometime ;-) and that is kinda my first year working. I am usually pretty fast at learning stuff (at school, etc.) -- not to brag but to brag.I use to do my stuff in less time than most people (maybe the thinking). But of course when you get out of school, problems can get bigger. Also I sometime think I read too much, don't act enough (code code code
).
I probably already thought of a lot of thing in OO, Pattern, etc. liked I said, but sometime seeing concret example of other, or the view of other (who spent 30-50 days -- I mean many days -- on a topic rather than 2-3 hours to explain it to us a simple way!) enlight us...
But then sometime knowing too much also confuse you
Note: Thinking in Java is free and you probably know this, I already readed some of it and tried to do the exercice (at beginning of the year). But if I remember well the chapter are LONG read... that is maybe the only drawback. I am not a native English reader/speaker/etc. so maybe I am more slow than most of you to understand well in English but I do the effort. I think I will reread fast that book one day to see, maybe I will never have [time] to reread it. ;-)
I feel a bit tired, I will go lay in my bed
Sleep for da weak. :-)
Have fun -- in ANYTHING you do is a good thing.
Some people think I go too far sometime when trying to achieve something (being perfectionnist), but I do not necessary invest that much more time than them, but it is fun for me to do thing "better", to achieve more, etc.
The most complex thing is to make thing simple. ;-)
-
Nov 12, 2004, 19:37 #80
- Join Date
- May 2003
- Location
- Calgary, Alberta, Canada
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
Originally Posted by Tony Marston
Here is your interface for a Person in your example application. This is not code writing by someone who believes in "Keeping it Simple Stupid" nor does it take into account massive amounts of Object Oriented Principles.
There is some serious refactoring to do.
PHP Code:class Person extends Default_Table {
function Person();
function getFieldSpec_original ();
function getValRep ($item = 'star_sign');
function _cm_commonValidation ($fieldarray, $orignaldata);
function _cm_getExtraData ($where, $fieldarray);
function _cm_getForeignData ($fieldarray);
function _cm_getInitialData ($fieldarray);
function _cm_popupCall ($popupname, &$where);
function _cm_pre_getData ($where_str);
}
class Default_Table {
function Default_Table ();
function deleteRecord ($fieldarray);
function deleteSelection ($selection);
function formatData ($fieldarray);
function getClassName ();
function getCount ($where);
function getData ($where) ;
function getData_unformatted ($where);
function getDBname () ;
function getEnum ($fieldname) ;
function getErrors () ;
function getExpanded ();
function getExtraData ($input) ;
function getFieldArray () ;
function getFieldSpec () ;
function getFieldSpec_original () ;
function getInitialData ($where) ;
function getLastPage () ;
function getLookupData () ;
function getMessages () ;
function getNavButtons ($task_id) ;
function getNodeData ($expanded, $where=null);
function getNumRows () ;
function getOrderBy () ;
function getOrderBySeq () ;
function getPkeyArray ();
function getPkeyNames () ;
function getTableName () ;
function getValRep ($item, $where=null) ;
function getWhere () ;
function insertMultiple ($fieldarray) ;
function insertRecord ($fieldarray) ;
function popupCall ($popupname, $where, $script_vars) ;
function popupReturn ($fieldarray, $return_from, $selection);
function setAction ($action) ;
function setDefaultOrderBy ($sql_orderby) ;
function setFieldAccess () ;
function setFieldArray ($fieldarray) ;
function setOrderBy ($sql_orderby) ;
function setOrderBySeq ($sql_orderby_seq) ;
function setPageNo ($pageno = '1') ;
function setRowsPerPage ($rows_per_page) ;
function setSqlSearch ($sql_search) ;
function sqlAssemble ($where) ;
function updateLinkData ($fieldarray, $postarray) ;
function updateMultiple ($fieldarray, $postarray);
function updateRecord ($fieldarray) ;
function updateSelection ($replace, $selection);
function validateDelete ($fieldarray) ;
function validateInsertArray ($fieldarray) ;
function validateUpdateArray ($fieldarray) ;
function _cm_commonValidation ($fieldarray, $originaldata) ;
function _cm_deleteSelection ($selection) ;
function _cm_formatData ($fieldarray) ;
function _cm_getExtraData($where, $fieldarray) ;
function _cm_getForeignData ($fieldarray) ;
function _cm_getInitialData ($fieldarray) ;
function _cm_popupCall ($popupname, $where) ;
function _cm_popupReturn ($fieldarray, $return_from, $selection) ;
function _cm_post_deleteRecord ($fieldarray) ;
function _cm_post_getData ($rowdata, &$where) ;
function _cm_post_insertRecord ($fieldarray) ;
function _cm_post_updateMultiple ($fieldarray) ;
function _cm_post_updateRecord ($fieldarray, $old_data) ;
function _cm_pre_deleteRecord ($fieldarray) ;
function _cm_pre_getData ($where_str) ;
function _cm_pre_insertRecord ($fieldarray) ;
function _cm_pre_updateLinkdata ($fieldarray, &$postarray) ;
function _cm_pre_updateMultiple ($fieldarray) ;
function _cm_pre_updateRecord ($fieldarray) ;
function _cm_updateSelection ($replace, $selection);
function _cm_validateDelete ($fieldarray) ;
function _cm_validateInsert ($fieldarray) ;
function _cm_validateUpdate ($fieldarray, $originaldata) ;
function _dml_deleteRecord ($fieldarray);
function _dml_deleteRelations ($fieldarray);
function _dml_getCount ($where);
function _dml_getData ($where);
function _dml_getEnum ($item);
function _dml_insertRecord ($fieldarray);
function _dml_ReadBeforeUpdate ($where);
function _dml_updateRecord ($fieldarray, $oldarray);
function _dml_updateSelection ($selection, $replace);
function _dml_validateDelete ($fieldarray);
function _getDBMSengine ();
function __sleep () ;
}
Having 100 or so functions in a class is a serious bad code smell. Doing these things and refactoring will drop the amount of code in your architecture by a ton.
Originally Posted by Tony Marston
The 3 tiers in your architecture are mixed up as far as I can see.
Your Presentation is tied to your database through column names, and form names. You couldnt change your database without changing your presentation. You cant change your presentation without changing your database. I find the way you have done this to be extremely difficult to use.
You have actual sql in your controller that is passed into your "DAO". This means you cant change your database without changing your controller.
Originally Posted by Tony Marston
The purpose of a data access layer is to "encapsulate" communication with the data source. Again, having sql in your controller screws this up.
Originally Posted by Tony Marston
Why not make these transaction controllers classes? (Im refering to files like std.list1.inc). Ill bet you could refactor these alot.
-
Nov 12, 2004, 21:56 #81
- Join Date
- Aug 2004
- Location
- California
- Posts
- 1,672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My thoughts on the original post: Sometimes you should use separate Mapper and sometimes you don't need to. But if you like Mappers by all means use them always. And if you don't, you'll be fine without them.
To MickoZ I'd say: Keep finding those practices that allow you to spend the least amount of time writing and maintaining software. The goal is to program as little as possible. That will hopefully maximize the time you can spend with the people you care about.
Emily Litella question: What's all this fuss about "development shurtcuts"? It's bad enough that most programmers have no sense of style, but do we have to cut their shirts? I think their shirts look find just the way they are...
Oh. I'm sorry. Never mind.
-
Nov 13, 2004, 06:16 #82
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Brenden Vickery
The definition of encapsulation is quite clear - all the properties and methods for an object must go into a single class.
Originally Posted by Brenden Vickery
If it comes to changing the structure of a table by adding or removing fields, then I agree that I have to make changes in my presentation and business layers, but such changes are extremely small being limited to adding or removing a field name from a simple list.
This is NOT a weakness in my design, it is a fact of life. You cannot write a business object that does not have knowledge of the data it has to work with, nor can you write a presentation layer that does not have knowledge of which fields to place where, and with what HTML control. It is simply not possible to write software which does not have knowledge of which fields exist in the database, therefore changes in the physical structure of the database will require changes in the software's knowledge of the database.
I have worked with several languages over the past 20 years that have used data dictionaries (aka application models) where the dictionary is a representation of the physical database. It is imperative that the dictionary and the database are kept synchronised - if you make changes to one without making corresponding changes to the other the software will fail.
What I have done is to place a mini data dictionary within each business object which simply contains the database engine name, the database name, the table name, and a list of fields. So if I change the physical structure of the database I must also change the data dictionary.
Originally Posted by Brenden Vickery
Originally Posted by Brenden Vickery
-
Nov 13, 2004, 06:26 #83
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Brended Vickery
-
Nov 13, 2004, 06:35 #84
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Really? I've never seen anything written in the principles of OOP that says a class must not have more than 'n' methods or 'n' properties, so as far as I am concerned that rule does not exist and so I choose to ignore it. It is an artificial rule designed by someone who likes to add complexity to the problem.
This is better known as a 'GOD' class and has been discussed before if you care to search?
The definition of encapsulation is quite clear - all the properties and methods for an object must go into a single class.
I would recommend you read this thread below
http://www.sitepoint.com/forums/showthread.php?t=36443
If it comes to changing the structure of a table by adding or removing fields, then I agree that I have to make changes in my presentation and business layers, but such changes are extremely small being limited to adding or removing a field name from a simple list.
There is no clear seperation of concerns there. Period, regardless of how much or little you have to change. Also complicates the maintenance of the presentation in my view?
This is NOT a weakness in my design, it is a fact of life.
PHP Code:class User {
public $id;
public $date;
public $username;
public $password;
public function __construct() {
}
public function get() {
}
public function insert() {
}
public function update() {
}
public function delete() {
}
...
public function get_param( $param ) {
return $this -> $param;
}
}
A rule I use is that is a layer directly interacts with the presentation, use either getters (as I have in above script) or use a helper class instead, other that that, if the layer is lower down then use properties directly.
If you use a helper class you also do not need to alter the presentation
-
Nov 13, 2004, 06:39 #85
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Here is an example of a helper class,
PHP Code:# example model domain 'helper'
class User {
var $id;
var $name;
function getId() {
return $this->id;
}
function getName() {
return $this->name;
}
// All of your setters aswell.
// This would contain all of you domain logic functions aswell
}
// Helpers only have functions relating to the view
class UserHelper {
private $user;
function UserHelper(User $user) {
$this->user = $user;
}
function getName() {
return $this->user->getName();
}
function getId() {
return $this->user->getId();
}
}
$user = getUserFromDatabaseSomehow();
// Carry out domainLogic
$this->view = new UserEditView(new UserHelper($user));
-
Nov 13, 2004, 10:19 #86
- Join Date
- Nov 2001
- Location
- UK
- Posts
- 553
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
Having read one of your earlier posts, I also feel you've misundersood what the purpose of a single User class is. A User object should represent one user, no more, no less, and should encapsulate the properties and responsibilities of the real-life object. That is to say, I (in real-life) don't have the responsibility of storing information about myself in a database - as such, a User object should be completely unaware of any database interaction. This is the One Responsibility Rule. Any code which stores or retrieves information about the user should ideally be held in another class (described as a Mapper in this thread) becuase that is a completely seperate responsibility.
User <-> UserMapper ( <-> DAO ) <-> Database
As I said, I am myself only learning, so correct me if I've misunderstood what I've read elsewhere.
Off Topic:
On an off-topic note: Tony, if your framework works for you then that's all that should matter. But (and it's a big "but") if you are going to post up all the intricate details of it on the web, surely you have to be prepared to take some criticism and advice from others?
Lastcraft most certainly does not need me to defend him, but over the past year he has constantly and consistantly proven himself to the members of this community and you'd do well to take his advice without being offended. Whether or not you choose to follow his advice is up to you, I know I certainly will...Regards, Ant.
-
Nov 13, 2004, 10:27 #87
- Join Date
- Jun 2003
- Location
- Iowa, USA
- Posts
- 3,749
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
http://c2.com/cgi/wiki?ManyShortMethodsPerClass
and since this seems to be the overall subject this thread has migrated to, perhaps this as well:
http://c2.com/cgi/wiki?FearOfAddingClassesJason Sweat ZCE - jsweat_php@yahoo.com
Book: PHP Patterns
Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
Detestable (adjective): software that isn't testable.
-
Nov 13, 2004, 10:35 #88
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You maybe need to use some deodorant as well
http://c2.com/cgi/wiki?CodeDeodorant
I started a new thread on the OneResponsibilityRule if anyone is interested in contributing to it. I'd be appreciated
-
Nov 13, 2004, 11:19 #89
- Join Date
- Jul 2004
- Location
- Canada, Qc
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Version0-00e
Else if I don't get something, can you post a pseudo-complete example (or point me to one) where we add a birthdate or something odd to an User object and we not need to alter let's say any add-edit-remove presentation page?
-
Nov 13, 2004, 11:23 #90
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by Tony Marston
Originally Posted by Tony Marston
Originally Posted by Tony Marston
Originally Posted by Tony Marston
Originally Posted by Tony Marston
Originally Posted by Tony Marston
Originally Posted by Tony Marston
yours, MarcusLast edited by lastcraft; Nov 13, 2004 at 21:51. Reason: Removed gratuitous insults
Marcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Nov 13, 2004, 11:24 #91
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Version0-00e
Originally Posted by Tony Marston
Originally Posted by Version0-00e
When it comes to building a screen for the user, whether it be a GUI screen or an HTML screen, you must have some method of specifying what fields are going to be displayed, in what order, what their labels are, what controls to use (e.g. text box, radio group, dropdown list, checkbox, etc). Without this knowledge your presentation layer, your screen builder, may generate screens that would not be appealing to the user.
Originally Posted by Version0-00e
How do you instruct your templating system on which fields to display, what size, in which order, what field labels to use, what controls to use? Or does it decide for itself, by magic?
Originally Posted by Version0-00e
PHP Code:class User {
public $id;
public $date;
public $username;
public $password;
public function __construct() {
}
public function get() {
}
public function insert() {
}
public function update() {
}
public function delete() {
}
...
public function get_param( $param ) {
return $this -> $param;
}
}
Originally Posted by Version0-00e
-
Nov 13, 2004, 11:51 #92
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
Originally Posted by AWilliams
Originally Posted by AWilliams
Last edited by Tony Marston; Nov 13, 2004 at 12:50.
-
Nov 13, 2004, 12:23 #93
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If I had that information spread over several different classes it would not only be more difficult to maintain, and would be more complex to deal with as I would have to flit from one class to another in order to get anything done.
But regardless this is the last time I'm taking time out to read this thread as I see it's pointless in my view to continue as you have no real interest is what others have to discuss
-
Nov 13, 2004, 12:40 #94
- Join Date
- Sep 2004
- Location
- New York, NY
- Posts
- 258
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lastcraft
-
Nov 13, 2004, 12:46 #95
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lastcraft
Originally Posted by lastcraft
If you have a system where you can add or remove fields from a database table without amending any business or presentation objects then I'm sure lots of us reading this thread would like to share in your secret.
Originally Posted by lastcraft
Originally Posted by lastcraft
Originally Posted by lastcraft
If someone is capable of making a constructive suggestion on how I can improve my infrastructure, or make it more efficient, or improve it in some other way then I will be more than happy to listen. But all the while you restrict your comments to 'you must not do it *that* way, you must do it *this* way' I will not listen. If I did things your way then I would be no better than you, and I am not convinced that 'your' way is the 'best' way. In an attempt to find something which is 'better' I have to start with something which is 'different', and it is this difference which seems to upset you.
-
Nov 13, 2004, 12:54 #96
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Version0-00e
-
Nov 13, 2004, 13:25 #97
- Join Date
- Jul 2004
- Location
- Canada, Qc
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just to challenge you a little Tony, how hard will it be for you in your sample application to follow this. (I just gone to play with it a little):
In Adding an user screen (comment, request, etc.):
- I do not like the fact that when you call the popup, the value that is already selected is not selected in the popup, will it be hard for you to add this?
- I do not like the fact that in the popup, I can pick two value, when in fact a person in your model seem to be able to be part of only one organisation. Suggestion: use radio button to show that the choice is single, or allow multiple selection and thread it accordingly.
- I guess the only way to go back in the new form when going into that popup mode, is to use the navigation section (on top) and click on new in case we want to cancel everything.
---------------
I know sometime some stuff doesn't look obvious or are not understood by the mass and when you dare to challenge them, they go against you. But then, in the end your way sometime seem to be more efficient (time, security, solution quality, etc.). You documented everything and that is nice, not a lot of people has done that this way.
I guess the problem here is people are trying to challenge the OO principle versus the architecture and your architecture is not 100% OO (and you even said so it was not, but people seem to forget that.)
I would say [withouth think much] that Tony's architecture use OO for structuring, etc. and he tries to make his own way to do stuff with a bit of creativity. He is maybe not separating everything and there is probably limitation with some stuff. But like any software, sometime limitation is good. ex: he choose to do popup a certains way, etc. maybe he can create a popup_style_1, popup_style_2 then simply say to his script which kind of popup to use (I have not verify that but I suspect from what I saw he done that this is the way he will do it)
I would like the "smart people" here not take personally or badly any critic from Tony and if you want to prove wrong, let's get concret, pragmatic, direct, etc.
He might challenge you and he might even be wrong![!!!] But I am sure that if you can prove his architecture wrong, he will try to improve it.
To do this, you have to find counter example where his architecture won't work or won't be efficient. Theory is nice, babbling is nice, we all like it somehow (we are a bit philsophical about software, aren't we in our own form?)
I have 20 years in software development might mean something or not. I have done 10 websites might mean something or not. etc. Even if Tony had 2 years in software development I would handle it the same way I guess (I don't get much impressed with experience often...but of course good experience that helped to improve upward beside stay at the same level or go a level below is a good sign)
-
Nov 13, 2004, 15:59 #98
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by MickoZ
Originally Posted by MickoZ
Originally Posted by MickoZ
Congratulations! You are the first person to tell me this 'expert' was wrong!
Originally Posted by MickoZ
How come nobody has commented on my use of XSL stylesheets where a single stylesheet can handle multiple screens? How come nobody has commented on the fact that of the 14 elements within my infrastructure 9 of them are totally resuable and 2 others are generated at runtime, leaving just 3 elements to be coded by the developer?
Originally Posted by MickoZ
-
Nov 13, 2004, 16:35 #99
- Join Date
- Jul 2004
- Location
- Canada, Qc
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
1. About popup passing value: well if your popup is of style "list" or if you use a combobox, it's behavior should be the same. The only difference is that the popup is external (whetever how you do your popup). Of course it depends on the kind of popup probably. In one where you pick a new value, it depends and can be acceptable.
2. I think letting the user select one or multiple items should be an important property (call it usability?!) And if your model is done the way I think, then it should not be a major problem adding that feature. radio != checkbox.
3. There is no good way or what about expert. I find stuff confusing in your sample apps (maybe with the tree stuff). However an option to "close" the popup withouth selecting any value is quite important. For now your popup act in the same screen. But it could be a real windows popup. It could also be in the same screen. I like to talk in concept and that is what your popup system is/can_be.
4. Personally I have not commented on your XSL, etc. stuff because well I am not familiar (even thought I know approximately how they should be used). Why people haven't? Because they see it in a developper kind of way. You are smart enough to ask question and know the answer probably, but sometime asking them to be sure is great. I guess other might have see this, but I think since you talk about OO, they try to judge it as OO and that is why there is miscommunication. Like I think you said (and I said[,and many other people]) programming is an art. You somehow invented (inspired by other stuff you been doing/saw/etc.) a way to do things. You put constraint (i.e. your system work X way, if an user want it's popup absolutely in the same screen, etc. you restrain this -- sure you can have a way to do it, but to stay concistent you maked a system and you try to follow it probably to save time -- personally my ideal system would allow me to include 1, 10 forms in one screen of the same type of widget, etc. But modeling it perfectly will be hard and I am not going there [yet?])
5. It should take you 10 minutes to create new style do it now ;-) *jk*
-------
Another thing I noticed... I guess this has to do with the session (and you can probably easily handle this?)... the navigation place dissapeared after sometime I let my browser idle... no matter where I did go, it was out of there, I guess your navigation is managed with your session or something. I could probably try to reproduce that, but I guess you are aware that this can happen [and accept it]?
-
Nov 13, 2004, 16:48 #100
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by MickoZ
Originally Posted by MickoZ
Bookmarks