on 5/8/2000 10:45 AM, Maciek Kaminski <[EMAIL PROTECTED]> wrote:
>> right...i think that is taking things to far. i think it makes the code to
>> complicated for others to work with. especially newer engineers...
> Probably this is a matter of taste, but I can't think of any more smiple way
> to express this.
dude...you are on this mailing list and looking at this project...look at
what is going on with this webmacro integration! :-)
> It is a matter of implementation. I may use (some) template
> system during rendering stage.
>
> I agree that look customization is important problem with this
> approach. It still needs a lot of ideas/work.
again, take a look at what we have done with Webmacro...we have already gone
through the same phases you seem to be in now. please, don't re-invent the
wheel.
>> Personally, I just don't like code like this. I find it pretty hard to read.
> People who have some experience in Swing programming find it
> easy.
Bingo. I have zero swing experience (nor do i want any). :-)
> Again, It is a matter of taste. It is one piece of code. In
> screen/action model one needs two classses.
right...but that is on purpose. it produces cleaner code that is also more
re-usable and easier to read over time.
> It does not make much sense to use components for simple
> things. They make things simple when you want something
> complicated:
>
> public class Table extends DefaultPaglet implements Paglet {
>
> public void init(Object o) {
>
> Object[][] data = {
> {"AA", "AB", "AC"},
> {"BA", "BB", "BC"},
> {"CA", "CB", "CC"},
> {"DA", "DB", "DC"}
> };
>
> String[] columns = {"C1", "C2", "C3"};
>
> DefaultTableModel tableModel = new DefaultTableModel(data,
> columns);
>
> TableColumnModel columnModel = new
> DefaultTableColumnModel();
>
> columnModel.addColumn(new TableColumn(
> 0, "C1", "C1", true,
> new DefaultRenderer(), new DefaultEditor(30)));
>
> columnModel.addColumn(new TableColumn(
> 1, "C2", "C2", true,
> new DefaultRenderer(), new DefaultEditor(30)));
>
> columnModel.addColumn(new TableColumn(
> 2, "C3", "C3", true,
> new DefaultRenderer(), new DefaultEditor(30)));
>
> HTable table = new HTable(tableModel, columnModel);
> addComponent(table);
> }
> }
gag...this is exactly the type of code we are moving away from. we have
already attempted to do stuff like this in the past and it all came down to
the fact that designers end up needing to edit the html code. hell, it makes
it hard for engineers to modify things as well. wait about 5 weeks and then
come back to this code and you will see how hard it is to modify. please
believe me...i have been there before. you are going down the wrong path.
the above approach is totally not MVC. your View portion is still in your
business logic, even if you have abstracted out the actual database stuff
and such, you still have this code wrapped around it. that is bad.
yes, my views on all of this have changed over time...i'm learning with all
of you...but i'm really starting to see the power of using a fully MVC
model. it is just SO much cleaner. instead of having these huge classes that
build the HTML, you simply put the html in your text files and build up the
Context in your Java code...much better model IMHO.
take a look at how i'm doing the Scarab project...the source code is in
CVS...
-jon
--
Java Servlet Based - Open Source | Collab.Net
Bug/Issue Tracking System |
<http://scarab.tigris.org/> | <http://Collab.Net/jobs/>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]