PDA

View Full Version : view-less classes?


whisperstorm
06-07-2004, 11:06 AM
I'm just starting to dig into creating some heavy duty lzx code, and I heard that reducing the number of "views" can help make things run faster. However, there's this idea of using classes to develop code. Yet using classes seems to have the added feature of adding views. Is there a way to reconcile this? I want to use classes and inheritance, etc. etc. while not making my application "view - heavy" Is this a reasonable question?

antun
06-18-2004, 09:53 AM
Wrapping something inside of a class is essentially wrapping a view, so it could be said that you're adding a view there. However another way to look at it is that you're replacing a view with the class definition. That doesn't add a view.

In general, adding a view here or there isn't going to affect performance greatly. But in cases where you have replicated views (rows in a table, points on a map etc.), adding a single view to the replicated view is going to add as many views as there are replicated views. So if you have twenty instances of a class in a list, and you make a change to the class that adds 5 views to it, you're adding 100 views.

-Antun

antun
06-18-2004, 09:54 AM
BTW, you can also do:


<class name="foo" extends="node">


... if you don't want your class to extend view. It won't be visible.

whisperstorm
06-23-2004, 04:30 PM
ah perfect, that was what I was looking for.