On 2011-05-27 16:38, Matthew Ong wrote:
On 5/27/2011 9:37 PM, Jacob Carlborg wrote:
On 2011-05-27 13:42, Matthew Ong wrote:
On 5/27/2011 7:08 PM, Steven Schveighoffer wrote:
Maybe you are not doing something correctly, you shouldn't need this
feature all the time.
Not me, others that has coded the dwt and I suspect other code in
dsource where they tries to mimic Java Library and perhaps C# also.
DWT is a direct port of the Java library SWT and it tries to stay as
close to the original code base as possible to easy merges of future
release of SWT.
No problem.I have not worked too much with SWT but people from
development world told me they really do not like Swing. Yes. I agree
because of the heavy/deep tree inheritance/too much manual
copy/paste/undo sort handling. Different topic.
>DWT is manually ported from Java. A automatic port was tried and it
>didn't workout that well, too much of the Java standard library needed
>to be reimplemented in D.
Yes. I notice that and notice that the language converter does
not work that well because of the semantics of differences in the
languages. Not impossible, but too heavy. Unless something like
JRuby(JVM) and also IronRuby(.NET) is done and made use of the existing
script engine extensions with existing API libray.
When coding my own projects (projects I've written from scratch and not
ported from other languages) it's a feature I rarely use, don't know if
I ever have used it.
Actually from scratch is NOT a good approach and migration approach. How
do you
justify this to business management people or to your client? There are
also your
learning cycle time.
Of course, from "scratch" can be interpreted in different ways. I use
the standard library and other libraries I need. But often when
developing tools for D one can't use already existing tools because they
don't support D or, in my opinion, aren't good enough. BWT, I don't have
to justify my own private projects to anyone. One last thing: what's
wrong with developing something from scratch just for the fun of it or
for learning something from it :)
Using Java well know Model-View-Controller as a simple model as a
discussion. See:
http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
Model= Business Data/IO/Persistance storage
Controller= Business Logic and where transaction code are done.
View= GUI/Web/Webservices(I am aware webservice is not a view)/Console.
Interconnection = how all the MVC are interacting with each other. Those
arrow in the diagram top right.
Model and Controller typically are similar if not identical across
different languages and platform. Most people would just do as much
POJO(Plain Old Java Object) as possible here.
However when it comes to the View and Interconnection...Those typically
changed when moving into different platform. Unless there is someone
that port them. Nothing much can be done here.
I'm working with the MVC design pattern every day at work (Ruby on Rails).
>it's a feature I rarely use, don't know if I ever have used it.
Because of many years of object-relational database management system
(ORDBMS). Most Database table even the flat one like Mysql are design
with this concept in mind. Hence, the Model and Controller will have
plenty of inheritance tree and mutually dependent code. That would mean
alias would be used.
As I said above: I'm using the MVC design pattern every day at work with
Ruby on Rails which has, in my opinion, a great ORM library. It's not
very often I create a class hierarchy of the models. Bacially the only
hierarchy that exists is inheriting form the framework classes but when
separating the framework from the user code there's basically no
hierarchy in the user code.
If porting SWT has already such syntax and scatted aliases, that would
be the burden that coder would have to take on, may I stress, could have
been taken over my compiler with new sets of keyword.
I can tell you this: after porting (almost) the whole SWT Mac OS X
version to D I haven't seen this as a problem. Just inserting a few
aliases and the problem is solved.
--
/Jacob Carlborg