Python Forum
Messenger Library for MVC-like Patterns
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Messenger Library for MVC-like Patterns
#1
I'm new to Python, and while I've done a fair bit of programming in general, the bulk has been highly unstructured and almost entirely for my own purposes. I'm doing a small application that has a few calculations, but the bulk of the coding is user interaction and presentation of data. Code reuse is not a primary goal of what I'm doing right now, but I know having the ability to reuse or repackage code in the future would be very useful.

I came across this thread, but it didn't offer any discussion: https://python-forum.io/Thread-WxPython-...VC-pattern

What messaging libraries are Python coders using for desktop application development where they are implementing an architectural pattern like MVC, MVP, etc.? Are you building your own? Using PyPubSub (https://github.com/schollii/pypubsub and https://pypi.org/project/PyPubSub/)? Using a larger framework?

I don't think I have the skills or experience to do my own, but I'm also not looking for a lot of features at the moment. The GitHub link above looks to be last updated maybe 2 years ago, with minor updates since then. Can I build on top of this with the understanding that there are likely no major bugs? PyPubSub doesn't appear to be HUGELY popular (stars and forks are relatively low) but it does seem to have somewhat of a presence on both GitHub and PyPi.

I'm open to suggestions or ideas!
Reply
#2
I'm not sure you need a library for it. The model/view/controller are just classes.

That said, I have zero experience using mvc for gui applications, only for websites. And in that context, Django has that support built in, as does Asp.net.

Is there something you currently use in another language that you're trying to get similar functionality out of with python?
Reply
#3
(Nov-05-2018, 04:34 PM)nilamo Wrote: I'm not sure you need a library for it. The model/view/controller are just classes.

*snip*

Is there something you currently use in another language that you're trying to get similar functionality out of with python?

Thanks for the reply. I'm not referring to the MVC classes themselves, rather whatever method is implemented for communicating between the classes to limit coupling (notifications, subscriptions, etc.).

Now that I think of it, for a similar project I was trying to do something MVVM related in C#, and using MVVM-light or another framework I don't recall. They had notifications or messages which I guess is what I'm trying to replicate in a sense. This is my first time really trying hard to implement something that is more maintainable and shareable as I'd like to post the project on GitHub once I feel a reasonable base has been laid down.

*edit*
Right now I have about 1000 lines of code, and it is already a mess to make updates to various bits of code since I was just doing things "as needed" to help define what I want the application to look like. Now I'm starting from line 0 again, and I would like to treat this as a learning opportunity for how to develop maintainable code.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Regex Include and Exclude patterns in Same Expression starzar 2 784 May-23-2023, 09:12 AM
Last Post: Gribouillis
  The included URLconf 'scribimus.urls' does not appear to have any patterns in it. nengkya 0 1,067 Mar-03-2023, 08:29 PM
Last Post: nengkya
  How to remove patterns of characters from text aaander 4 1,109 Nov-19-2022, 03:34 PM
Last Post: snippsat
  Extracting data based on specific patterns in a text file K11 1 2,204 Aug-28-2020, 09:00 AM
Last Post: Gribouillis
  How to Find & Count String Patterns Between two Markers in a HTML file ahmedwaqas92 3 2,961 Aug-19-2019, 10:12 AM
Last Post: ahmedwaqas92
  Instant Messenger API recommendations? jspada20 1 1,849 Feb-10-2019, 10:45 PM
Last Post: Larz60+
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,788 May-06-2017, 11:29 AM
Last Post: harun2525
  NameError: name 'patterns' is not defined Debian 1 9,923 Apr-28-2017, 06:04 AM
Last Post: nilamo
  desired patterns nengkya 5 4,776 Apr-15-2017, 10:34 PM
Last Post: ichabod801
  printing set of lines between patterns pybegin 2 4,083 Dec-13-2016, 07:34 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020