Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72379 > unrolled thread
| Started by | "Ernest Bonat, Ph.D." <ernest.bonat@gmail.com> |
|---|---|
| First post | 2014-06-01 10:37 -0700 |
| Last post | 2014-06-11 17:26 -0400 |
| Articles | 10 — 8 participants |
Back to article view | Back to comp.lang.python
Is MVC Design Pattern good enough? "Ernest Bonat, Ph.D." <ernest.bonat@gmail.com> - 2014-06-01 10:37 -0700
[OT] Re: Is MVC Design Pattern good enough? Dan Sommers <dan@tombstonezero.net> - 2014-06-01 18:39 +0000
Re: Is MVC Design Pattern good enough? Wolfgang Keller <feliphil@gmx.net> - 2014-06-02 17:59 +0200
Re: Is MVC Design Pattern good enough? Marko Rauhamaa <marko@pacujo.net> - 2014-06-02 19:40 +0300
Re: Is MVC Design Pattern good enough? Wolfgang Keller <feliphil@gmx.net> - 2014-06-09 22:56 +0200
Re: Is MVC Design Pattern good enough? Chris Angelico <rosuav@gmail.com> - 2014-06-10 13:32 +1000
Re: Is MVC Design Pattern good enough? Chris Angelico <rosuav@gmail.com> - 2014-06-10 14:03 +1000
Re: Is MVC Design Pattern good enough? Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-10 08:45 -0600
Re: Is MVC Design Pattern good enough? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-10 19:16 +0100
Re: Is MVC Design Pattern good enough? Terry Reedy <tjreedy@udel.edu> - 2014-06-11 17:26 -0400
| From | "Ernest Bonat, Ph.D." <ernest.bonat@gmail.com> |
|---|---|
| Date | 2014-06-01 10:37 -0700 |
| Subject | Is MVC Design Pattern good enough? |
| Message-ID | <mailman.10526.1401644679.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hi All, I had developed many database business applications using MVC design pattern with different programming languages like PHP, Java EE, VB.NET, C#, VB 6.0, VBA, etc. All of them defined the Model layer as the data management of the application domain and business logic implementation. I ready don’t understand what the data has to do with applications business logic. Nothing? Can we implement the application business logic in another layer? Yes or no? Why? Explain? Thank you all for the inputs! -- Thanks Ernest Bonat, Ph.D. Senior Software Engineer Senior Business Statistics Analyst Mobile: 503.730.4556 Email: ernest.bonat@gmail.com
[toc] | [next] | [standalone]
| From | Dan Sommers <dan@tombstonezero.net> |
|---|---|
| Date | 2014-06-01 18:39 +0000 |
| Subject | [OT] Re: Is MVC Design Pattern good enough? |
| Message-ID | <lmfs1a$9ug$1@dont-email.me> |
| In reply to | #72379 |
On Sun, 01 Jun 2014 10:37:24 -0700, Ernest Bonat, Ph.D. wrote: > ... MVC design pattern ... defined the Model layer as the data > management of the application domain and business logic implementation > ... Can we implement the application business logic in another layer? > Yes or no? Why? Explain? This is not a Python-specific question, but as far as I'm concerned, you can certainly add structure, modularity, testability, maintainability, readability, flexibility, etc. to your Model (with a capital "M"). And if that means separating your data management (which usually translates to "persistence") from your business logic, then that's what it means. HTH, Dan
[toc] | [prev] | [next] | [standalone]
| From | Wolfgang Keller <feliphil@gmx.net> |
|---|---|
| Date | 2014-06-02 17:59 +0200 |
| Message-ID | <20140602175936.9341c3e8fb06c7e627ce559a@gmx.net> |
| In reply to | #72379 |
> I had developed many database business applications using MVC design > pattern with different programming languages like PHP, Java EE, > VB.NET, C#, VB 6.0, VBA, etc. All of them defined the Model layer as > the data management of the application domain and business logic > implementation. I ready don’t understand what the data has to do with > applications business logic. Nothing? Can we implement the > application business logic in another layer? Yes or no? Why? Explain? The most intuitive approach to database applications would be: http://en.wikipedia.org/wiki/Naked_objects http://www.nakedobjects.org/ The original "Inventor" of MVC once declared that this concept matches his intentions a lot better than the very vast majority of MVC implementations. Unfortunately, there's no Python framework (yet?) that implements this design. Sincerely, Wolfgang
[toc] | [prev] | [next] | [standalone]
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Date | 2014-06-02 19:40 +0300 |
| Message-ID | <87bnubtgcv.fsf@elektro.pacujo.net> |
| In reply to | #72421 |
Wolfgang Keller <feliphil@gmx.net>: > The most intuitive approach to database applications would be: > > http://en.wikipedia.org/wiki/Naked_objects > http://www.nakedobjects.org/ > > [...] > > Unfortunately, there's no Python framework (yet?) that implements this > design. It could be a blessing in disguise. Too often people encumber simple concepts with frameworks. Marko
[toc] | [prev] | [next] | [standalone]
| From | Wolfgang Keller <feliphil@gmx.net> |
|---|---|
| Date | 2014-06-09 22:56 +0200 |
| Message-ID | <20140609225632.942a3e42d9b05f050acd1b1d@gmx.net> |
| In reply to | #72426 |
> > The most intuitive approach to database applications would be:
> >
> > http://en.wikipedia.org/wiki/Naked_objects
> > http://www.nakedobjects.org/
> >
> > [...]
> >
> > Unfortunately, there's no Python framework (yet?) that implements
> > this design.
>
> It could be a blessing in disguise. Too often people encumber simple
> concepts with frameworks.
The point is that frameworks (for this kind of application) (should)
allow people who are not computer scientists but domain specialists to
implement useful applications.
Which makes sense since especially in the domain of typical "business"
applications, since it's much easier to teach a reasonably
computer-literate domain specialist a programming language that's
user-friendly such as Python and a user-friendly framework, instead of
teaching a software developer the knowledge of the application domain.
So the computer scientist(s) designs and implement the framework, and
the domain specialist(s) implements the domain-specific application
logic.
The "naked objects" concept makes this especially intuitive since all
the domain-specific application logic is in the "business objects". And
since you don't need to implement anything else besides these to get a
functional application.
Unfortunately, the developer of the naked objects framework has chosen a
language that is pretty bad in terms of "usability" for domain
specialists; Java. And it sucks for GUIs, too. C# isn't much better,
expecially since it's limited to a pathologic non-operating system.
Python could demonstrate the interest of this concept much better than
the existing Java and C# implementations, not only because it's much
better suited to non-computer scientists, but also because it's more
cross-platform than C# and better for GUIs than Java.
Another important aspect of "naked objects" is about reducing the
amount of code that needs to get written to implement a given
functionality. Python is definitely more efficient here than Java and
C#.
In short; Python would be the perfect choice of implementation language
for such a ("naked objects") framework.
Unfortunately with all that hype about "web applications", there is
little focus today on (frameworks for) applications that are actually
useful for end-users who have to get real work done with the computer.
Sincerely,
Wolfgang
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-06-10 13:32 +1000 |
| Message-ID | <mailman.10939.1402371156.18130.python-list@python.org> |
| In reply to | #73060 |
On Tue, Jun 10, 2014 at 12:57 PM, Stefan Ram <ram@zedat.fu-berlin.de> wrote: > AFAIK standard Python has no GUI library at all, so Java SE > and C# already are better than Python insofar as they > include a standard GUI toolkit at all! In Python one first > has to choose between more than a dozen of »GUI frameworks«, > and then the result of the comparison between Python and Java SE > would depend on that choice. Define "standard Python". I'm pretty sure a stock-standard Python installation includes tkinter, although that may not necessarily be true on all platforms. But personally, I'd rather use GTK than Tkinter. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-06-10 14:03 +1000 |
| Message-ID | <mailman.10940.1402373048.18130.python-list@python.org> |
| In reply to | #73066 |
On Tue, Jun 10, 2014 at 1:54 PM, Stefan Ram <ram@zedat.fu-berlin.de> wrote: > Chris Angelico <rosuav@gmail.com> writes: >>On Tue, Jun 10, 2014 at 12:57 PM, Stefan Ram <ram@zedat.fu-berlin.de> wrote: >>>AFAIK standard Python has no GUI library at all, so Java SE >>>and C# already are better than Python insofar as they >>>include a standard GUI toolkit at all! In Python one first >>>has to choose between more than a dozen of »GUI frameworks«, >>>and then the result of the comparison between Python and Java SE >>>would depend on that choice. >>Define "standard Python". > > »Standard Python 2.7.6 (or 3.4.1)« contains all those and > only those features that are available under every > implementation of Python 2.7.6 (or 3.4.1, respectively). > > It is the set of features an implementation must compass to > call itself »an implementation of Python 2.7.6 (or 3.4.1, > respectively)«. The os module would have to be considered part of the standard library, but its contents differ according to your OS. And quite a bit of stuff isn't in a "python3-minimal" package on Debian - such as the threading module, which is definitely part of the standard library. So is python3-minimal not properly Python 3? By the way, how come when I quote your post and send stuff back UTF-8, your mailer then quotes it, doesn't transcode it, and sticks an ISO-8859-1 header on it? Note above, your quotes are borked. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2014-06-10 08:45 -0600 |
| Message-ID | <mailman.10955.1402412012.18130.python-list@python.org> |
| In reply to | #73066 |
On Mon, Jun 9, 2014 at 9:54 PM, Stefan Ram <ram@zedat.fu-berlin.de> wrote: > Chris Angelico <rosuav@gmail.com> writes: >>On Tue, Jun 10, 2014 at 12:57 PM, Stefan Ram <ram@zedat.fu-berlin.de> wrote: >>>AFAIK standard Python has no GUI library at all, so Java SE >>>and C# already are better than Python insofar as they >>>include a standard GUI toolkit at all! In Python one first >>>has to choose between more than a dozen of »GUI frameworks«, >>>and then the result of the comparison between Python and Java SE >>>would depend on that choice. >>Define "standard Python". > > »Standard Python 2.7.6 (or 3.4.1)« contains all those and > only those features that are available under every > implementation of Python 2.7.6 (or 3.4.1, respectively). > > It is the set of features an implementation must compass to > call itself »an implementation of Python 2.7.6 (or 3.4.1, > respectively)«. A circular and therefore useless definition. Given any implementation X and a feature Y not supported by X, one can equally well say that either 1) X is not an implementation of Python because Y is part of "standard Python"; or 2) Y is not part of "standard Python" because implementation X doesn't support it.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-06-10 19:16 +0100 |
| Message-ID | <mailman.10967.1402424406.18130.python-list@python.org> |
| In reply to | #73060 |
On 10/06/2014 04:32, Chris Angelico wrote: > On Tue, Jun 10, 2014 at 12:57 PM, Stefan Ram <ram@zedat.fu-berlin.de> wrote: >> AFAIK standard Python has no GUI library at all, so Java SE >> and C# already are better than Python insofar as they >> include a standard GUI toolkit at all! In Python one first >> has to choose between more than a dozen of »GUI frameworks«, >> and then the result of the comparison between Python and Java SE >> would depend on that choice. > > Define "standard Python". I'm pretty sure a stock-standard Python > installation includes tkinter, although that may not necessarily be > true on all platforms. But personally, I'd rather use GTK than > Tkinter. > > ChrisA > IDLE is available on all platforms and is written in tkinter. But personally I'd rather use the command line :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-06-11 17:26 -0400 |
| Message-ID | <mailman.11020.1402522014.18130.python-list@python.org> |
| In reply to | #73113 |
On 6/11/2014 2:27 PM, Stefan Ram wrote: > Mark Lawrence <breamoreboy@yahoo.co.uk> writes: >> IDLE is available on all platforms and is written in tkinter. But >> personally I'd rather use the command line :) > > In the meantime, I have learned that tkinter in fact has > become part of a standard Python implementations, and in > fact it looks easier to use than Swing (but I have only > looked at seven lines of Python-tkinter code so far). > > A naked-objects framework should be easy to implement > because AFAIK it treats all objects the same, so one does > only have to code a single View and Controller for a > »generic object« and some general utility operations. I though about trying naked-objects with tkinter and I think it should be reasonably possible. I have too much else to do but would like to see what could be done. -- Terry Jan Reedy
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web