473,698 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event-driven framework (other than Twisted)?

Are there any python event driven frameworks other than twisted?
Oct 1 '08 #1
15 3774
On Wed, 01 Oct 2008 01:01:41 -0700, Phillip B Oldham wrote:
Are there any python event driven frameworks other than twisted?
Most GUI package use event-driven model (e.g. Tkinter).

Oct 1 '08 #2
On Oct 1, 9:25*am, Lie Ryan <lie.1...@gmail .comwrote:
Most GUI package use event-driven model (e.g. Tkinter).
I've noticed that. I'm thinking more for a web environment (instead of
MVC) or as a HTTP server. I know Twisted has TwistedWeb, but I'm
looking for alternatives.
Oct 1 '08 #3
Phillip B Oldham schrieb:
On Oct 1, 9:25 am, Lie Ryan <lie.1...@gmail .comwrote:
>Most GUI package use event-driven model (e.g. Tkinter).

I've noticed that. I'm thinking more for a web environment (instead of
MVC) or as a HTTP server. I know Twisted has TwistedWeb, but I'm
looking for alternatives.
Please explain what you want to do. Maybe the spread toolkit
can help you:

http://www.spread.org/index.html

HTH,
Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Oct 1 '08 #4
On Oct 1, 4:12*pm, Thomas Guettler <h...@tbz-pariv.dewrote:
Please explain what you want to do.
I'm primarily looking for alternatives to MVC frameworks for web
development, particularly SAAS. I've looked around, and some
whitepapers suggest that event-based frameworks often perform better
than MVC. Since I'm looking at SAAS, having a "view" is pretty
pointless since I'll either be using Thrift, returning simple HTTP
headers, or returning some sort of JSON/YAML/XML content (possibly
based on accept headers).
Oct 1 '08 #5
Phillip B Oldham a écrit :
On Oct 1, 4:12 pm, Thomas Guettler <h...@tbz-pariv.dewrote:
>Please explain what you want to do.

I'm primarily looking for alternatives to MVC frameworks for web
development, particularly SAAS. I've looked around, and some
whitepapers suggest that event-based frameworks often perform better
than MVC. Since I'm looking at SAAS, having a "view" is pretty
pointless since I'll either be using Thrift, returning simple HTTP
headers, or returning some sort of JSON/YAML/XML content (possibly
based on accept headers).
"view" doesn't imply (x)html - any valid HTTP response is ok. The whole
point of decoupling controler from view (in web MVC) is to allow the
same controler to return different views.
Oct 1 '08 #6
On Wed, 01 Oct 2008 18:09:20 +0200, Bruno Desthuilliers wrote:
Phillip B Oldham a écrit :
>On Oct 1, 4:12 pm, Thomas Guettler <h...@tbz-pariv.dewrote:
>>Please explain what you want to do.

I'm primarily looking for alternatives to MVC frameworks for web
development, particularly SAAS. I've looked around, and some
whitepapers suggest that event-based frameworks often perform better
than MVC. Since I'm looking at SAAS, having a "view" is pretty
pointless since I'll either be using Thrift, returning simple HTTP
headers, or returning some sort of JSON/YAML/XML content (possibly
based on accept headers).

"view" doesn't imply (x)html - any valid HTTP response is ok. The whole
point of decoupling controler from view (in web MVC) is to allow the
same controler to return different views.
In fact, MVC and event-driven is two entirely different concept. You can
have both, or none. It is, in the end, your choice which one to use or
whether you want to use both or none.

Event-driven programming is a concept that your programs are entirely
composed of function definition and binding that function definition to
events. The rest is handled by a mainloop, which calls the appropriate
functions when it receives something.

MVC is a separation of concern. In MVC code you want that there is a
clear boundary between code that handles Model, View, and Controller, so
it'd be easier to manage the code.

Oct 1 '08 #7
You could take a look at this interesting looking server that popped up
on the mailing list a while back:

http://code.google.com/p/yield/

On Wed, 2008-10-01 at 01:01 -0700, Phillip B Oldham wrote:
Are there any python event driven frameworks other than twisted?
--
http://mail.python.org/mailman/listinfo/python-list
--
John Krukoff <jk******@ltgc. com>
Land Title Guarantee Company

Oct 1 '08 #8
On Oct 1, 6:53*pm, Lie Ryan <lie.1...@gmail .comwrote:
In fact, MVC and event-driven is two entirely different concept. You can
have both, or none. It is, in the end, your choice which one to use or
whether you want to use both or none.

Event-driven programming is a concept that your programs are entirely
composed of function definition and binding that function definition to
events. The rest is handled by a mainloop, which calls the appropriate
functions when it receives something.

MVC is a separation of concern. In MVC code you want that there is a
clear boundary between code that handles Model, View, and Controller, so
it'd be easier to manage the code.
So are there any other patterns that can be used in stead of MVC?
Oct 1 '08 #9
On Wed, Oct 1, 2008 at 6:01 PM, Phillip B Oldham
<ph************ @gmail.comwrote :
Are there any python event driven frameworks other than twisted?
Phillip, I have been developing a rather unique
event-driven and component architecture library
for quite some time that is (not twisted). Actually
it's nothing like twisted, but based on 2 core
concepts:
* Everything is a Component
* Everything is an Event

It's currently called pymills.event
Let me know if you're interested, I probably
plan to re-package and re-branch this library
(the event library) at some point.

Here's a small snippet showing off some of
pymills.event's features:

<code>
#!/usr/bin/env python
# -*- coding: utf-8 -*- # vim: set sw=3 sts=3 ts=3

from pymills import event
from pymills.event import *

class TodoList(Compon ent):

todos = {}

def add(self, name, description):
assert name not in self.todos, "To-do already in list"
self.todos[name] = description
self.push(Event (name, description), "added")

class TodoPrinter(Com ponent):

@listener("adde d")
def onADDED(self, name, description):
print "TODO: %s" % name
print " %s" % description

def main():
event.manager += TodoPrinter()
todo = TodoList()
event.manager += todo

todo.add("Make coffee", "Really need to make some coffee")
todo.add("Bug triage", "Double-check that all known issues were addressed")

for value in manager:
print value

if __name__ == "__main__":
main()
</code>

This example is based on a similar example provided
by the Trac project (which was also to show of it's
Component architecture).

Thanks,

cheers
James

--
--
-- "Problems are solved by method"
Oct 2 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
49577
by: Pavils Jurjans | last post by:
Hallo, I have been programming for restricted environments where Internet Explorer is a standard, so I haven't stumbled upon this problem until now, when I need to write a DOM-compatible code. The question is about best practices for passing parameters to an event function. I have, say, the following HTML:
3
2730
by: Marcia Gulesian | last post by:
How can I capture the event when I click (focus) with the cursor anywhere in the page (that is, on a component or elsewhere). This event would occur in an I.E 5.5 or later browser.
6
14903
by: rich_poppleton | last post by:
Help.... I've got a textarea where people type in a description. However for certain reasons we need to stop them typing !$*^ . I have a solution this which works fine in IE: function keypress() {
3
12134
by: Melissa | last post by:
What specifically causes the Format event of a report's section to fire? Thanks! Melissa
5
5327
by: Action | last post by:
does it works like ordinary virtual method?? coz I find that child class can't invoke the event of the parent class. class parent { public virtual event SomeDelegate SomeChanged; } class child : parent {
41
4302
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based on some initialization information obtained elsewhere. Basically, I'm going to create my own dynamic toolbar where the toolbarbuttons can change. I'm not using the VB toolbar because of limitations in changing things like backcolor (I can't get...
15
21357
by: prabhdeep | last post by:
Hi, Can somebody explain, why in following code, i get "event not defined" error funcTest(sMenu) { doument.getElementById('id1').addEventListener('mousedown', function(){ click(sMenu, event); }, false); }
7
1713
by: Michael D. Ober | last post by:
Is there anyway to raise an event from a class and require that any program using that class (not just inheritance) have an event handler for specific events in the class? In my case, some events don't need to be handled, but some must be handled by the program that uses the class. I'm looking for something along the lines of Class MyClass Event OptionalEvent(parms) Event RequiredEvent(parms)
5
1892
by: Richard Grant | last post by:
Hi, I need to "save" in a variable the event handler sub of a control's event, then perform some process, and finally "restore" the originally saved event handler. Example in pseudo-code: 1) Save cmbMyCombo's event handler for SelectedIndexChange event. 2) Assign a temporary event handler sub to cmbMyCombo's for its SelectedIndexChange event.
0
2074
by: Kamilche | last post by:
''' event.py An event manager using publish/subscribe, and weakrefs. Any function can publish any event without registering it first, and any object can register interest in any event, even if it doesn't exist yet. The event manager uses weakrefs, so lists of listeners won't stop them
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.