[Seaside] Ideas worth stealing

stephane ducasse stephane.ducasse at free.fr
Mon Jun 2 06:42:21 UTC 2008


Lukas decided to package pier in a more user friendly way.
So we will really start using it.

Stef


On Jun 2, 2008, at 3:13 AM, Todd Blanchard wrote:

> I think that Seaside has been moving very fast the last year or so  
> and I have not been able to keep up with it when I don't have client  
> work that I can use it on.  For awhile it was kind of the Lukas and  
> Philippe show and things were just too much in flux to go near it.   
> Since 2.8 is released, I think this is no longer true.
>
> What would be really great would be for people to stop building the  
> next seaside and start building things WITH seaside to share.  It is  
> the classic Smalltalk problem - we have the best tools and we spend  
> all of our time using them to build better tools. :-)
>
> Seriously - a huge contribution would be an empty seaside app that  
> allows users to register, login, recover passwords, and an  
> administrator UI to allow assigning permissions levels (just tags)  
> to the users and mass mail them.  This could serve as the basis for  
> building any number of additional seaside apps on top of it and  
> would hopefully foster a lot of activity in building community  
> extensions on top of it.   So if anyone is looking for an idea....
>
> Scalable deployment recipes are lacking as well.
>
> A VERY common problem one finds on the web is the desire to have an  
> instant community website with forums, a blog, some static content  
> (marketing info or instructional manuals) and a little store to  
> charge money for things. Google 'integrate phpbb wordpress' to get a  
> feel for how many people want to do this.
>
> I've spent a lot of time with Drupal lately.  As a user, I love how  
> I can download and install features into an integrated website.  As  
> a developer, I've found that module development in Drupal is REALLY  
> hard and obscure.  my drupal site is http://audiofreakshow.com.  I  
> wrote a MIDI performance app last summer and I want to sell license  
> activation keys through this site.  I've found drupal module  
> development to be really hard to get into and I'm not making any  
> headway on that.  It is sad because it is the only thing keeping me  
> from marketing JambaLaya seriously.  It would be cool to use a  
> seaside site to do this, but all I had to do to get the drupal site  
> to where it is was download modules and hack a bit of CSS.  I did it  
> in a few hours.
>
> I would love to dive in and participate - sadly I have two more RoR  
> projects in the queue - one launches this week, another will take  
> all summer.  But I will keep looking for opportunities to help.  I  
> just have this cash flow problem you see....
>
> -Todd Blanchard
>
> On Jun 1, 2008, at 11:56 AM, stephane ducasse wrote:
>
>> Hi Todd
>>
>> You are right but you can also participate.
>> You want a lot and we are few.
>> Just a reminder Lukas delivers a lot of high quality code:
>> 		Pier
>> 		Seaside
>> 		Magritte
>> Lukas is helping maintaining the website of seaside, doing a PhD, ...
>> I always mentioned that it would be good to have Magritte to  
>> produce simple table and sql mapping.
>> Now if nobody builds something for what he needs then it will not  
>> exist.
>> I think that Seasiders could share more. May be there is not enough  
>> producers
>> compared to the consumers.
>>
>> Stef
>>
>>
>> On Jun 1, 2008, at 8:45 PM, Todd Blanchard wrote:
>>
>>> That is an interesting question - I've taken a run with magritte  
>>> once or twice and did not make satisfactory progress and abandoned  
>>> it.
>>>
>>> I found the method of defining the meta model in magritte to be  
>>> rather ponderous and awkward.
>>>
>>> Not that it isn't expressive, but I don't know all the parts/ 
>>> mappings/kinds of things - I spent all this time looking at the  
>>> docs or examples.  Also the documentation is non-existent.   
>>> Really, if you want to get people to use magritte - STOP CODING  
>>> AND START DOCUMENTING - I don't have time to figure it out from  
>>> the examples or pier or any running code.  I want docs and code  
>>> snippets I can steal and modify. I want them in a nicely indexed  
>>> web site so I can find a solution to my exact problem using google  
>>> in about sixty seconds.
>>>
>>> Note website for activescaffold: http://activescaffold.com
>>> Click on documentation.  Wow, everything I need to know right  
>>> there.  Brilliant. Where is the equivalent resource for Magritte?   
>>> Google couldn't find it.
>>>
>>> Most of what you need to define the magritte model is already in  
>>> the database schema - so can magritte just infer the fields and  
>>> let me just customize it's behavior?
>>>
>>> The missing part in the database is the mapping of widgets and the  
>>> order or presentation of fields.
>>>
>>> In the system I am doing (sells tickets to a new museum) there is
>>>
>>> Order->OrderTransactions (subclassed to Purchase,Exchange,Return)- 
>>> >Tickets (actually two relations - tickets added, tickets removed)
>>>
>>> The code to get a fully functioning back office/admin UI to edit  
>>> this entire network is below - there's very little of it.  Most of  
>>> the code is just to customize elements - change labels for  
>>> columns, change column order, suppress presentation of some  
>>> columns or relationships.
>>>
>>> Why I picked Rails:
>>>
>>> 1) I already had an existing mysql database I had to use.
>>> 2) Client wanted a technology with a large local pool of talent he  
>>> could hire - robotcoop is nearby (spinoff of amazon.com) - they  
>>> are all rails and it is easy to hire people from there
>>> 3) I had a lot of UI that is back office and can be kind of ugyly/ 
>>> auto-generated and only a little public UI (ticket purchase flow)
>>> 4) Rails has a number of scalable deployment recipes available -  
>>> I'm using apache->mongrel cluster.   I will add capistrano to  
>>> automate upgrade deployments
>>> 5) I'm replacing an equivalent system written in a nightmare  
>>> combination of Java/Hibernate/Cocoon-js/xml-xslt/tomcat that  
>>> nobody wants to maintain.  I can't learn that many languages - but  
>>> I most certainly can steal/translate logic and templates - it was  
>>> easy to translate jsp to rhtml templates.
>>>
>>> For your amusement - the entirety of the order/ordertransaction/ 
>>> ticket code is below - it does a two level master-detail view with  
>>> ajax updates in a single page.  It took me almost no time at all  
>>> to get this working and the majority of the code you see is just  
>>> appearance tweaks or action disabling.
>>>
>>>
>>> :
>>> #model - (all of it - really)
>>> class Order < ActiveRecord::Base
>>>   set_table_name 'orders'
>>>   has_many :order_transactions, :class_name =>  
>>> 'OrderTransaction', :foreign_key => 'order_id', :dependent  
>>> => :destroy
>>>   belongs_to :purchaseTransaction, :class_name =>  
>>> 'TicketPurchase', :foreign_key => 'purchaseTransaction'
>>> end
>>>
>>> class OrderTransaction < ActiveRecord::Base
>>>   has_many :ticketsReturned, :class_name => 'Ticket', :foreign_key  
>>> => 'returnTransaction', :include => [:price, :product], :dependent  
>>> => :destroy, :order => 'sequence_number'
>>>   has_many :ticketsAdded, :class_name => 'Ticket', :foreign_key =>  
>>> 'originatingTransaction', :include =>  
>>> [:price, :product], :dependent => :destroy, :order =>  
>>> 'sequence_number'
>>>
>>> class TicketPurchase <  OrderTransaction
>>> end
>>>
>>> class TicketExchange <  OrderTransaction
>>> end
>>>
>>> class TicketReturn <  OrderTransaction
>>> end
>>>
>>> class Ticket < ActiveRecord::Base
>>> end
>>>
>>> #controllers - tops is most complicated - remove create update and  
>>> delete abilities - add some action links (all of it)
>>> class Admin::OrderController < AdminController
>>>   layout "admin"
>>>   active_scaffold :orders do | config |
>>>     config.actions.exclude :delete
>>>     config.actions.exclude :update
>>>     config.actions.exclude :create
>>>     config.action_links.add :resend_email, :label => 'Resend  
>>> Email', :type => :record, :position => false, :confirm => 'Resend  
>>> purchase confirmation email?'
>>>     config.action_links.add :exchange_tickets, :label => 'Exchange  
>>> Tickets', :type => :record, :position => :after, :crud_type  
>>> => :update
>>>     config.action_links.add :refund_tickets, :label => 'Refund  
>>> Tickets', :type => :record, :position => :after, :crud_type  
>>> => :update
>>>       list.sorting = {:date => 'ASC'}
>>>       config.list.columns =  
>>> [:date 
>>> , :commissionAccount 
>>> , :nameFirst, :nameLast, :emailAddress, :order_transactions]
>>>       config.list.per_page = 100
>>>       config.columns =  
>>> [:date 
>>> , :commissionAccount 
>>> , :nameFirst 
>>> , :nameLast 
>>> , :emailAddress 
>>> , :address1 
>>> , :address2, :city, :state, :zip, :country, :order_transactions]
>>>   end
>>> end
>>>
>>> class Admin::OrderTransactionController < AdminController
>>> layout "admin"
>>> active_scaffold :order_transaction do | config |
>>>   config.list.columns =  
>>> [:date 
>>> , :type 
>>> , :channel, :payment, :credit, :ticketsAdded, :ticketsReturned]
>>>   config.actions.exclude :delete
>>>   config.actions.exclude :update
>>>   config.actions.exclude :create
>>> end
>>> end
>>>
>>> class Admin::TicketController < AdminController
>>> layout "admin"
>>> active_scaffold :ticket do | config |
>>>   config.list.columns =  
>>> [:forGto 
>>> , :validForDate 
>>> , :product, :price, :status, :purchasePrice, :serviceCharge, :order]
>>>   config.list.per_page = 100
>>>   list.sorting = {:validForDate => 'ASC'}
>>>   columns[:validForDate].label = "Date"
>>>   columns[:product].label = "Description"
>>>   columns[:price].label = "Ticket"
>>>   columns[:purchasePrice].label = "Price"
>>>   columns[:serviceCharge].label = "Service Charge"
>>>   config.actions.exclude :delete
>>>   config.actions.exclude :update
>>>   config.actions.exclude :create
>>> end
>>>
>>> #views - auto-generated - no code at all
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Jun 1, 2008, at 12:47 AM, stephane ducasse wrote:
>>>
>>>> todd
>>>> do you think that magritte could help there?
>>>>
>>>> Stef
>>>>
>>>> On May 31, 2008, at 1:04 AM, Todd Blanchard wrote:
>>>>
>>>>> I watched the screencast.  It is not the same thing.  I think  
>>>>> you guys are missing something key in that project of yours.
>>>>>
>>>>> Active scaffold simply lets me point the app at a db and ZAM  
>>>>> total admin UI that looks nice with AJAX master detail editing.   
>>>>> I can then filter out attributes that people ought not to edit,  
>>>>> apply permissions, and decorate the app with task links.
>>>>>
>>>>> The demo shows app development.  I didn't develop a thing apart  
>>>>> from specify some mappings because the database used weird and  
>>>>> inconsistent naming conventions.
>>>>>
>>>>> I also found it interesting that the app being developed in the  
>>>>> screencast didn't look nearly as sophisticated as the tools  
>>>>> being used to build it.  I don't find that a good selling point.
>>>>>
>>>>> -Todd Blanchard
>>>>>
>>>>> On May 30, 2008, at 4:28 AM, James Robertson wrote:
>>>>>
>>>>>> Cincom is doing exactly that - combining the ActiveRecord  
>>>>>> pattern with scaffolding.  Have a look here:
>>>>>>
>>>>>> http://www.cincomsmalltalk.com/userblogs/mls/blogView?showComments=true&printTitle=WebVelocity_alpha_screencast&entry=3388846573
>>>>>>
>>>>>> James Robertson
>>>>>> Cincom Smalltalk Product Evangelist
>>>>>> http://www.cincomsmalltalk.com/blog/blogView
>>>>>> Talk Small and Carry a Big Class Library
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On May 30, 2008, at 3:13 AM, Todd Blanchard wrote:
>>>>>>
>>>>>>> With the idea that no good idea should go un-stolen, allow me  
>>>>>>> to introduce seaside fans to active scaffold http://activescaffold.com 
>>>>>>> .
>>>>>>>
>>>>>>> I am wrapping up a ruby on rails engagement with a client and  
>>>>>>> discovered this framework.  I ended up using ROR because the  
>>>>>>> client had an existing mysql database and Squeak's mysql  
>>>>>>> support isn't so hot where rails is all about mysql, and I had  
>>>>>>> only a couple "flows" but a whole lot of plain old admin-CRUD  
>>>>>>> to do and rails excels at plain crud on mysql.  With  
>>>>>>> activescaffold - I had to write very little code for the admin  
>>>>>>> UI - a major plus because this project is on a very tight  
>>>>>>> timeline.
>>>>>>>
>>>>>>> Anyhow, activescaffold works with activerecord and infers a  
>>>>>>> really slick AJAX UI that supports sensible CRUD more or less  
>>>>>>> instantly.  Once installed, you can go through and customize  
>>>>>>> views by adding actions links, filtering columns, and  
>>>>>>> generally overriding bits of logic to make it more task focused.
>>>>>>>
>>>>>>> It would be really cool to have a similar facility in Seaside.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> -Todd Blanchard
>>>>>>> _______________________________________________
>>>>>>> seaside mailing list
>>>>>>> seaside at lists.squeakfoundation.org
>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>> seaside at lists.squeakfoundation.org
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/ 
>>>>>> seaside
>>>>>
>>>>> _______________________________________________
>>>>> seaside mailing list
>>>>> seaside at lists.squeakfoundation.org
>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>
>>>>
>>>> _______________________________________________
>>>> seaside mailing list
>>>> seaside at lists.squeakfoundation.org
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



More information about the seaside mailing list