[symfony-users] Realtime Applications using Comet and Symfony
I have been researching alot of realtime web technologies to a point where i am just pretty confused on how everything should work together, so i wonder if anyone has any experience in this field yet ? When you dig around google and read up on that topic you find alot of new technologies and terms like XMPP, BOSH, comet, Bayeux etc and wonder how they all fit together. So i am currently thinking about an architecture for an upcoming project and would like to hear some thoughts about that from people with experience on how the whole thing works. On the web based side will be a traditional symfony web application which shows overview of some data on a page. On the other side will be alot of Windows Mobile Client implemented in C# that need to send and recieve data in realtime, this data should be visible in the symfony application as soon as its send. As i dont want to use constant polling i looked into all the avaible realtime technologies and thought of this architecture: Using the StreamHub Comet Java Server: 1. The WM C# Clients send/receive data to/from the StreamHub java Server via JSON over HTTP. 2. The StreamHub Java Server exchanges incoming messages via JSON-RPC (or SOAP or something similar) with the symfony backend to process the incoming data 3. The StreamHub Server then triggers a message to the web client saying something like "new data for xy avaible" 4. the web client requests the new data via Ajax from the symfony backend and updates the view One could also implement this with an XMPP server and BOSH (XMPP over HTTP) to broadcast messages between clients, but all the examples i have seen never include a database so i wonder how that part is handled. I dont want to only forward Data to clients, i also need to process it in the symfony backend and save it to the database so that its persistent, so i would use the realtime component more like "hello there new data, go an fetch it via traditional ajax" to prevent long polling. I wonder if that is the route to go here, as there isnt much information avaible on the interwebs on this quite new topic. Best regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: symfony template vs smarty
not too much difference since both compile to php files. Smarty has its own syntax though which you have to learn and which has limits, while the symfonys template component uses standard php which can do anything you want it todo without writing workarounds in smarty... also one could argue that PHP already is a template engine, thats why symfonys approch uses normal php for templates and just seperates the view from the logic, smarty on the other hand is a completly new layer on top of php which is unnecessary. On 28 Sep., 17:33, hutchic wrote: > As a long term symfony user I personally want to use symfony > templating component for a new system. > > Problem is I need to convince management. What are the advantages of > symfony over smarty (phptal etc etc) from a management point of view? > > Thanks for your input / assistance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Getting large amounts of realtime Data into a symfony application
Hello, in the last days i have been thinking alot about some kind of architecture for an upcoming project, but my limited experience in that field makes it really hard to decide on possible solutions, so i thought that id ask the symfony community for help :) The basic setup is this: On the one side there is a web portal written in symfony 1.2 using doctrine and all the bells and whistles, standard web stuff as you know it. We will eventually have several HTTP and DB Servers and a load balancer etc, so it will be a scalable solution. On the backend side there will be a python daemon/programm that receives large amounts of data over XMPP/Jabber. I choose python here because php is just not made for programs that run infinitly, even if it would be possible it doesnt feel right for me. Anyhow, i now need a solution to bridge both sides together, to basically alter data in the web portals database. The python XMPP client will recieve messages that alter user data in the portal, so i would need a bidirectional way to send/recieve data to the portal server. This could be easily done via HTTP and RPC calls, but i guess that would be rather slow if there are 100+ messages coming in per minute. Another method could be sending the object JSON encoded ober XMPP, but then id still need a php XMPP client that periodically polls the XMPP server, fetches new messages and applies the changes to the database. I could aswell just let the python daemon write to the DB directly, but that way i couldnt use my symfony Models and validation algorithms... At one point when using symfony i will always end up polling some service with php to process the changes, but maybe using HTTP for that isnt too bad since it scales pretty good. I could cache alot of data on the python client and send big JSON chunks over HTTP to the portal to process it, maybe thats a good solution ? i really dont know, any tips apreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony 1.2 sfDoctrineGuardPlugin saves related rows twice
So i have the the latest version of symfony 1.2 and sfDoctrineGuardPlugin. I already has this working in 1.1 but now in 1.2 its giving me headaches... This is what happens: Form Validation etc all works perfect, all the data gets created, also related table data gets created. It creates a sf_guard_user and a user_profile related with the sf_guard_user_id. But it also creates another user_profile entry with the exact same data but the sf_guard_user_id field set to "NULL" These queries are being logged: 1. INSERT INTO sf_guard_user (algorithm, is_active, is_super_admin, username, salt, password, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?) - (sha1, 0, 0, toxical, 00d59c371c95a0c758eba9d3ec24686a, 9081b4f3cf2a15792c0e8cca06309d31614ae4eb, 2008-11-18 15:56:58, 2008-11-18 15:56:58 ) 2. SELECT u.id AS u__id, u.slug AS u__slug FROM user_profile u WHERE u.slug LIKE ? - (arne% ) 3. INSERT INTO user_profile (sf_guard_user_id, first_name, email, created_at, updated_at, slug) VALUES (?, ?, ?, ?, ?, ?) - (1, Arne, [EMAIL PROTECTED], 2008-11-18 15:56:58, 2008-11-18 15:56:58, arne ) 4. SELECT u.id AS u__id, u.slug AS u__slug FROM user_profile u WHERE u.slug LIKE ? - (arne% ) 5. INSERT INTO user_profile (first_name, email, created_at, updated_at, slug) VALUES (?, ?, ?, ?, ?) - (Arne, [EMAIL PROTECTED], 2008-11-18 15:56:58, 2008-11-18 15:56:58, arne-1 ) You can check all the source code here: http://pastebin.com/m78375889 This is the POST Data send to the form object: array 'username' => string 'toxical' (length=7) 'password' => string 'test123' (length=7) 'password2' => string 'test123' (length=7) 'yUserProfile' => array 'first_name' => string 'Arne' (length=4) 'email' => string '[EMAIL PROTECTED]' (length=16) 'id' => string '' (length=0) Any help appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony 1.2 sfDoctrineGuardPlugin Validation Error
so i upgraded to sf 1.2 today and have this register form that worked in 1.1 but in 1.2 it gives me the following error that doesnt say much: 500 | Internal Server Error | Doctrine_Validator_Exception Validation error in class sfGuardUser stack trace * at () in SF_ROOT_DIR/lib/symfony/plugins/sfDoctrinePlugin/lib/doctrine/ Doctrine/Transaction.php line 265 ... 262. if ($this->_internalNestingLevel == 1) { 263. $tmp = $this- >invalid; 264. $this->invalid = array(); 265. throw new Doctrine_Validator_Exception($tmp); 266. } 267. } 268. if ($this->_nestingLevel == 1) { i stripped it down to just the basic sfGuardUserForm and this processing: $this->form = new registerForm(); if ($request->isMethod('post')) { if ($this->form->bindAndSave($request->getParameter ('sf_guard_user'))) { //$this->user = $this->form->getObject(); //$this->sendRegConfirmation(); } } still get that error which i didnt have with 1.1 Whats wrong ? thx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
that works now, but i dont really get why but oh well...maybe i should have done it the other way round, embedding the profile in the sfguard user form or something like that. Anyway, thanks alot On Oct 30, 4:02 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote: > It works for me with this: > > schema > -- > Profile: > columns: > first_name: string(255) > last_name: string(255) > email_address: string(255) > sf_guard_user_id: integer(4) > relations: > User: > class: sfGuardUser > type: one > foreignType: one > > user form > -- > class sfGuardUserForm extends PluginsfGuardUserForm > { > public function configure() > { > unset($this['is_active'], $this['is_super_admin'], $this['created_at'], > $this['updated_at'], $this['last_login'], $this['algorithm'], $this['salt'], > $this['groups_list'], $this['permissions_list']); > $profile = new ProfileForm(); > unset($profile['sf_guard_user_id']); > $this->embedForm('Profile', $profile); > } > > } > > actions > -- > class testActions extends sfActions > { > /** > * Executes index action > * > * @param sfRequest $request A request object > */ > public function executeIndex($request) > { > $this->form = new sfGuardUserForm(); > if ($request->getMethod() == sfRequest::POST) > { > $this->form->bindAndSave($request->getParameter('sf_guard_user')); > $this->redirect('test/index'); > } > } > > } > > template > --- > > > > > > > > On Thu, Oct 30, 2008 at 9:49 AM, kayoone <[EMAIL PROTECTED]> wrote: > > > complete and updated code: > >http://nopaste.php-q.net/66370 > > -- > Jonathan H. Wage > Open Source Software Developer & > Evangelisthttp://www.jwage.comhttp://www.doctrine-project.orghttp://www.symfony-project.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
complete and updated code: http://nopaste.php-q.net/66370 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
damn, i thought that might have been it, but nothing...still only the profile gets created, sf_guard_user table is empty :/ Maybe i have to do it the other way round ? embed the profile into the sfguard form ? But i trief that earlier and it also didnt work. On Oct 30, 3:18 pm, "Jonathan Wage" <[EMAIL PROTECTED]> wrote: > Oh. You have the embedForm() named incorrectly. > > $this->embedForm('sfGuardUser', new sfGuardUserForm()); > > Doctrine takes the submitted form information and passes it to > $object->fromArray() so the embedded form must be named the same as the > relationship. > > - Jon > > On Thu, Oct 30, 2008 at 8:53 AM, kayoone <[EMAIL PROTECTED]> wrote: > > > Hi Jonathan, > > > that doesnt make a difference :/ > > there are atleast 3 other people on irc/the forums curious about this > > > i am using sf 1.1 with the latest doctrine 1.1 branch from the repo > > -- > Jonathan H. Wage > Open Source Software Developer & > Evangelisthttp://www.jwage.comhttp://www.doctrine-project.orghttp://www.symfony-project.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
Hi Jonathan, that doesnt make a difference :/ there are atleast 3 other people on irc/the forums curious about this i am using sf 1.1 with the latest doctrine 1.1 branch from the repo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
you can view my code here, quite simple, just testing http://nopaste.php-q.net/66103 the profile is saved, but there is no new guarduser being created with it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
but i have seen several people having theses same issues, that how i got to that solution of creating another form instance look at this thread => http://www.symfony-project.org/forum/index.php/t/15911/ that exactly my problem and the only solution is the one i already wrote in my last post which i dont think is any good. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
thank you, but i figured that out already. In the posts above they said to look at the sfGuard Forms to get a hang of form embedding, its just that i cant find anything... I got my embedded profile form together with the sfGuardForm, but when processing and calling $this->form->save() only the main form gets saved...i dont get why. The embedded form is validated and the data is present in the object, it just doesnt get saved. I have seen approaches here to manually bind the values to the embedded form object, and save the embedded form by itself, is that really the only way to do it ? The Mainform has all the data from both forms, validated and good to go, and then i should create another instance of the embedded form and bind the values to it again only to be able to manually call its save() method ? That doesnt sound very consistent to me...why cant the mainform save the emebedded form ? It has all relations and data it neeeds... thx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: embed propel forms
embedded forms drive me mad... i dont get what you guys are mean... in the BasesfGuardUserForm Classes that get generates, there is nothing regarding an embedded form... i have my schema setup to link to a profile like this: UserProfile: actAs: [Sluggable, Timestampable] tableName: user_profile columns: user_id: integer first_name: string(50) last_name: string(50) email: string(100) relations: User: class: sfGuardUser local: user_id foreign: id foreignType: one owningSide: false but there is nothing with embedded forms generated and when i generate the crud stuff for this i can just create the sf guard user, not the profile what am i doing wrong ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] symfony 1.1 : how to set global errors
Hi there, i have recently started playing around with symfony 1.1 for a new project and really like it. I even like the new form system quite alot. However, i ran into a problem where i dont know how to solve it in a good way... In my older symfony 1.0 applications i used to have an area where all the errors where displayed, no matter if they came from a form or the model or an ajax request...the validators in 1.0 added the errors to the Request Object, in my models i could ad errors to the request object myself, when for example creation of a db entry failed and a rollback was done. In my layout i then called $sf_request->getErrors() and displayed all the error messages there are. However in symfony 1.1, things are not that easy. getErrors() and setError() are dreprecated and form errors now belong to the form object and i dont see a simple way to get other system errors in there, which wouldnt be good design anyway since they sometimes are not related to a form. What i could do is get the erros from the form and assign them to a template variable and let my model methods return errors too, to also assign them to the template and then displaying all the errors at once. That however, would require to write a method that does this process and call it in every action which is not the solution i have in mind. So how do you do something like that? In 1.0 the setError getErrors() methods were perfect for that, i even could display ajax errors in the same error area but now this seems to be alot more complicated. thx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Files to Secure in an Open Source Application
i do it the same way. Files that include private config parameters are named for example config.orig.php which everybody who exports the project has to rename and enter his information. The real config.php is set to svn:ignore so its never comitted to the svn. On Jul 6, 9:25 am, "Nicolas Perriault" <[EMAIL PROTECTED]> wrote: > On Sun, Jul 6, 2008 at 12:40 AM, ibolmo <[EMAIL PROTECTED]> wrote: > > 1. What's your opinion of the workaround? Is there a better/cleaner > > solution? > > I personnaly version distributed files, by suffixing them with -dist, > and add original files to svn:ignore. This way, people who checkout > the project have just to copy and rename the *-dist files to get ready > without having to handle conflicts and merges. > > > 2. What other files should I exclude (add to svn:ignore), or secure > > (like in the workaround)? I've already ignored/secured the database > > file (I use sqlite locally), dsn, logs and cache folders. > > You should distribute the propel.ini file, as it also contain a DSN > definition. If you put api keys or passwords in your app.yml files, > you should distribute them as well. > > The web/uploads/* files should be added to svn:ignore too. > > Last, if you plan to release a Propel based plugin, you should > svn:ignore its lib/model/om/* and lib/model/map/* to allow people to > customize their propel.ini file, eg. enabling comments generation or > behaviors. > > ++ > > -- > Nicolas > Perriaulthttp://prendreuncafe.com-http://symfonians.net-http://sensiolabs.com > Phone: +33 660 92 08 76 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Sub domains
@Mark i think what he means is that if he is using url_for() or link_to() in the templates, that it wont produce Urls with the subdomains... is there a way to solve that ? Maybe the simplest solution would be to make a link helper that wraps around the basic symfony link helpers On 4 Jul., 18:06, Mark D <[EMAIL PROTECTED]> wrote: > Hi Damien > > All you have to do it setup apache to redirect all *.yourwebsite.com > to your symfony application: > > > ServerAlias *.yourwebsite.com > > DocumentRoot "/Users/yourname/workspace/sitename/web" > > AllowOverride All > > > Alias /sf /Users/mdeepwell/workspace/symfony/1.0.17/data/web/sf/ > > > Then, inside the index page (to start), or more appropriately a > filter, use the php variable: $_SERVER['HTTP_HOST'] to figure out > which "mymcategory".mywebsite.com you are on. Once you know which sub > domain you are on, you can load whatever information you want. > > That is the full solution. > > Mark > > On Jul 4, 12:57 am, Damien <[EMAIL PROTECTED]> wrote: > > > Thank you for your answers. > > > Jacob, I saw your post, but I don't know how to redirect to a category > > in my filter. I can not do a redirect() like in an action. > > Moreover, I would like all my category links to be rewritten in order > > to link to my subdomains, should I use the routing.yml? It is not > > simple! > > > Damien > > > On 4 juil, 04:52, Jacob Coby <[EMAIL PROTECTED]> wrote: > > > > I brought this very same question up 2 days ago. Check out the > > > Symfonians filter source - it has what you need. > > > >http://groups.google.com/group/symfony-users/browse_thread/thread/b48... > > > > On Jul 3, 2008, at 12:20 PM, Damien wrote: > > > > > Hi! > > > > > I have a website built with symfony, organized with categories. I > > > > would like to have a subdomain for each category. For example: > > > > > mymcategory.mywebsite.com > > > > > I made my subdomain and catch it in my apache webserver, but I don't > > > > know how to make it available in my website. > > > > I tought to build a new route in my routing.yml like: > > > > > subdomain: > > > > host: mycategory.mywebsite.com > > > > url: / > > > > param: {module: category, action: show, name: mycategory} > > > > > It doesn't work. Should I use it or make a filter ? But I don't know > > > > how to make this type of filter. > > > > > I hope you will be able to help me. > > > > > Thank you > > > > > Damien Gougeon > > > > -- > > > Jacob Coby > > > [EMAIL PROTECTED] Masquer le texte des messages précédents - > > > > - Afficher le texte des messages précédents - > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Multiple Front end servers and sflucene.
another option would be to sync the index data between the servers with rsync, which would also lead to better load balance for the index files. On Jun 8, 5:10 pm, James <[EMAIL PROTECTED]> wrote: > Is there a better answer, NFS is not an option I want to explore. > Part of the reason is security. The other is I don't know if EC2 will > let me NFS over the non public address. Not to mention that NFS has > this nasty let's crash and not gracefully recover habit... > > Thanks, > James > > On Jun 8, 2008, at 3:46 AM, Nicolas Perriault wrote: > > > > > On Sun, Jun 8, 2008 at 9:42 AM, James <[EMAIL PROTECTED]> wrote: > > >> We plan on having 2 front end servers. If someone creates a review > >> on > >> one server the index will only be for that server. What is the best > >> way of keeping the indexes in sync for both servers? > > > You can mount a NFS directory as ./data/index/ to share the data > > between your servers. > > > ++ > > > -- > > Nicolas Perriault > >http://prendreuncafe.com-http://symfonians.net-http://sensiolabs.com > > Phone: +33 660 92 08 76 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: how can I count online users? (what about user offline because of timeout?)
having every user ping the server every X seconds with an ajay request is not that good performance wise... imagine you have 2000 concurrent users on the site, that would result in bazillion more requests per minute (if you ping every 15sec for example). You have to save the time of the last click of a user and update that time with every action he performs. So if you want to get the online users you just fetch all the users where the last_click time is in the last 20 minutes for example, everybody whose last_click time is older is offline then. Thats a common practice to solve this problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do you sync your production db ?
thanks for all the informative answers, good stuff! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How do you sync your production db ?
thx, didnt know about that plugin. will give it a try! On 20 Mai, 22:18, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > If you have no choice, the 2nd solution is the best, and the one I use > when I can't use the other one, which is the plugin > "sfPropelSQLDiffPlugin". > This plugin provides some tasks so you can have the "diff" between > your tables and your schema, so you just alter tables and not alter > data. > But what doesn't (or not often) work and must be handled by hand is : > - renaming fields > - editing constraints with innodb tables (or any engine supporting > constraints) > > In highly active development, I think this could be very tiring as > renaming fields or changes like this are very common. > But in a more stable cycle, this can be used quite easily. > > !! ALWAYS SAVE PRODUCTION DATABASE & FILES BEFORE ANY CHANGE !! > > This may be obvious, but it must be said everytime we talk about such > a subjet ^^ > > On 20 mai, 18:42, kayoone <[EMAIL PROTECTED]> wrote: > > > symfony has nice features to deploy your applications and to create > > the database from the schema files etc. > > > However, once you got data on your production machine its not that > > easy to keep the database layout in sync, so how do you do it ? > > > Since my symfony project is not production ready i am thinking about > > this, and these are the possibilities that came to my mind: > > > 1. Edit the database on the prod. machine manually and alter the > > tables to match local tables (very bad) > > 2. Dump the data on the prod. machine, sync the project and run propel- > > build-all, and then reimport the dump again (quite ok, but still some > > work) > > > Any other ways ? > > Some Pake task like symfony sync-database or something like that would > > be really good, which just alters the tables/creates new ones instead > > of recreating everything from scratch. > > > thx for your thoughts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How do you sync your production db ?
symfony has nice features to deploy your applications and to create the database from the schema files etc. However, once you got data on your production machine its not that easy to keep the database layout in sync, so how do you do it ? Since my symfony project is not production ready i am thinking about this, and these are the possibilities that came to my mind: 1. Edit the database on the prod. machine manually and alter the tables to match local tables (very bad) 2. Dump the data on the prod. machine, sync the project and run propel- build-all, and then reimport the dump again (quite ok, but still some work) Any other ways ? Some Pake task like symfony sync-database or something like that would be really good, which just alters the tables/creates new ones instead of recreating everything from scratch. thx for your thoughts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfGuardPlugin DB Layout Question
very nice, that could indeed make it still possible to work on the layout with Dbdesigner. but after messing around with the schema.yml i got the feeling that its not so uncomfortable in comparision than i thought it would be, so i will stick with it. Your snippet will still be useful to me one day, when i need to reimport my database. On 20 Mai, 16:25, "Olivier LOYNET" <[EMAIL PROTECTED]> wrote: > Hi, > > I've made a snippet to workaround this > problemhttp://www.symfony-project.org/snippets/snippet/298 > > Olivier > > > -Original Message- > > From: symfony-users@googlegroups.com [mailto:symfony- > > [EMAIL PROTECTED] On Behalf Of kayoone > > Sent: Tuesday, May 20, 2008 3:28 PM > > To: symfony users > > Subject: [symfony-users] Re: sfGuardPlugin DB Layout Question > > > got it now... > > the problem was that I use DbDesigner to model the database where i > > cant > > make a relationship to a table thats not in the current layout, so no > > way to make a relationship to a table of a plugin. > > This however works when i use the yml file for editing the db layout, > > so > > i think dbdesigner days are over :/ > > Well, doesnt change much anyway. > > > anyway, thx for all your input, got me on the right path finally. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfGuardPlugin DB Layout Question
got it now... the problem was that I use DbDesigner to model the database where i cant make a relationship to a table thats not in the current layout, so no way to make a relationship to a table of a plugin. This however works when i use the yml file for editing the db layout, so i think dbdesigner days are over :/ Well, doesnt change much anyway. anyway, thx for all your input, got me on the right path finally. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfGuardPlugin DB Layout Question
i think i tried that already and that didnt really work because as far as i know propel objects need their own primary key to work correct. But ill try that again... I also dont need the user table often, but when i need a nickname, i need a user table. Problem is i cant make a relationship between the profile table and eg the article table because symfony needs a auto increment primary key for make a FK relationship...so that cant work they way you said !? how to you connect the user table to a content table ? On 19 Mai, 17:48, Lee Bolding <[EMAIL PROTECTED]> wrote: > There's a MUCH simpler way - leave out the id column in > sf_guard_user_profile, and use a user_id column (foreign key to > sf_guard_user). > > Works for me :) > > I end up doing most of my stuff by working with user profiles, because > that contains the data I need most often - firstname, lastname etc. > Rarely do I actually need to modfiy the data in sf_guard_user table... > so it doesn't make sense to be working with user objects directly. > > I'm not sure if that's the *correct* way of doing it, but it's > efficient, and it works for me :) > > On 19 May 2008, at 16:08, kayoone wrote: > > > > > mmh...the thing is, i dont want to have the sfGuard schema in my main > > schema because of the problems described above, and > > the relation betweet sfguarduser and the profile table is just set via > > the config, there is no real relationship i guess. > > The getProfile() method of the sfGuardPlugin is looking for the > > profile table name in the config and fetching the profile via > > the foreign key field which is also defined in the config so there is > > no way for me to change that behavior without changing the plugin > > code. > > > However i can just use the user_id Foreign key field to make > > relationships to site content since thats also a primary key and we > > have only one profile > > per user, but that wont solve the problem that i have to do extra > > joins to get the username, also $article->getSfGuardUser() wont work > > then either i think. > > > I really wonder how other people do this. > > > On 19 Mai, 16:30, Lee Bolding <[EMAIL PROTECTED]> wrote: > >> Yes, but with a 1:1 relationship they'll both be the same number. > >> They > >> should never be different unless you've manually altered your > >> database. > > >> But you can use constraints to further enforce this :) > > >> On 19 May 2008, at 13:31, kayoone wrote: > > >>> but propel objects need their own a primary key, otherwise they wont > >>> work. > >>> But i will try if that works, still the profile_id will be different > >>> from the user_id > > >>> On 19 Mai, 12:21, Lee Bolding <[EMAIL PROTECTED]> wrote: > >>>> Make the user_profile->sfGuardUser a 1:1 relationship, then you > >>>> don't > >>>> need to do a join - the profile ID will always be the same as the > >>>> user > >>>> id. > > >>>> Realistically, are users ever going to have more than 1 profile? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfGuardPlugin DB Layout Question
mmh...the thing is, i dont want to have the sfGuard schema in my main schema because of the problems described above, and the relation betweet sfguarduser and the profile table is just set via the config, there is no real relationship i guess. The getProfile() method of the sfGuardPlugin is looking for the profile table name in the config and fetching the profile via the foreign key field which is also defined in the config so there is no way for me to change that behavior without changing the plugin code. However i can just use the user_id Foreign key field to make relationships to site content since thats also a primary key and we have only one profile per user, but that wont solve the problem that i have to do extra joins to get the username, also $article->getSfGuardUser() wont work then either i think. I really wonder how other people do this. On 19 Mai, 16:30, Lee Bolding <[EMAIL PROTECTED]> wrote: > Yes, but with a 1:1 relationship they'll both be the same number. They > should never be different unless you've manually altered your database. > > But you can use constraints to further enforce this :) > > On 19 May 2008, at 13:31, kayoone wrote: > > > > > but propel objects need their own a primary key, otherwise they wont > > work. > > But i will try if that works, still the profile_id will be different > > from the user_id > > > On 19 Mai, 12:21, Lee Bolding <[EMAIL PROTECTED]> wrote: > >> Make the user_profile->sfGuardUser a 1:1 relationship, then you don't > >> need to do a join - the profile ID will always be the same as the > >> user > >> id. > > >> Realistically, are users ever going to have more than 1 profile? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfGuardPlugin DB Layout Question
but propel objects need their own a primary key, otherwise they wont work. But i will try if that works, still the profile_id will be different from the user_id On 19 Mai, 12:21, Lee Bolding <[EMAIL PROTECTED]> wrote: > Make the user_profile->sfGuardUser a 1:1 relationship, then you don't > need to do a join - the profile ID will always be the same as the user > id. > > Realistically, are users ever going to have more than 1 profile? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfGuardPlugin DB Layout Question
nobody using sfGuard for complex projects? Common :) I dont see a problem i using the profile_id to link it with site content, but it would need 2 joins then to get the username. eg: $article->getMemberProfile()->getsfGuardUser()->getUsername() That would result in more complex queries, which might be slower especially when there is a list to be displayed with many entries and usernames. Really wondering how people do it, if you use the sfguarduser table you have to get the sfguard schema.yml into your main schema and then you have the problems i described above. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfGuardPlugin DB Layout Question
Hi there, i use sfGuard in a recent project for the first time and am pretty happy with it, however i ran into an issue id like to sahre with you / hear your opinion on. sfGuard has a basic user table and a profile table which i can link with the user table, for that sfGuard has its own schema.yml file. Because i thought it would be better to link site content to the actual user id instead of the profile id i ran into the problem not being able to link my tables with the sfGuard user table because it was/is in a different schema file. Because i design my DB Layout with DBDesigner 4 and use a plugin to convert it to a schema.yml file i needed to rebuild my DBDesigner file from the database where everything is already imported and link the tables again by hand after than. So now i had the sfGuard tabels in my DBDesigner layout and could link the user table to content tables (eg. articles.member_id FK from sf_guard_user.id). Everything fine but a new problem arose. When exporting this DBDesigner layout symfony recreates the sfGuardModel files under lib/model/ (which of course default symfony behaviour). When i call $article->getSfGuardUser() now symfony uses the model file unter /lib/model and not the plugin files, which of course is not what i want and wont work because i cant access many of the methods implemented in the plugin base model. The only way i figured out to come around this problem is to not directly join the tables in the DBLayout (so now "official" link between article.member_id and sf_guard_user.id) and write the "getSfGuardUser()" method on my own into the model. This works, but really isnt the kind of solution i have in mind, besides i lose some innodb features like "ON DELETE CASCADE" which i could rewrite myself but thats not ideal either. So how do you solve this problem ? I am at the point where i say it would be better to leave the sfGuard DB Layout out of my general db layout and just put my profile table in there and link all the site content to the profile_id which shouldnt make many problems, even if its not the real user_id which is registered in the system. thx in advance for your thoughts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Modules vs Plugins
thx for your answer! On 17 Mai, 20:26, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > For your first question : modules should be specific to a project, > plugins are made for reusability. > Of course you can svn:externals a module, and it will be the same, > but : > - whenever you have to make a specific change to this module for a > specific project, you cannot, or you have to create a branch in your > SVN... > - this is not the way it should be ^^ Thats correct, havent thought about that point but its really important to be able to extend a plugin for a specific project without touching the plugin itself. Great stuff! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Modules vs Plugins
Hi all, i am wondering what the benefits are in using plugins vs moduls, or if there are any at all. Many of the modules which are developed for an application cant be reused in future projects, atleast thats what i plan to do, so that when you have 4-5 Projects which all use most of the same modules i only have to make changes/fixes to the plugin once for all the projects that use it. To achieve this i would link the module/plugin with svn:externals into a project, to make sure i always have the latest version of it. With that in mind, would it be better to make plugins out of the modules that i want to reuse or can i leave them as modules ? The benefits i see with using plugins is, that a plugins has all its model/confing/ routing/image etc files in one place, while a module has its files all over the place, so i think that plugins are the best way to achieve this, what do you think ? Another question: When having a plugin that has its own action controller/template files can i create the same dir structure under /apps/mypp/modules/ to overwrite/extend plugin files ? ist that default symfony behaviour ? Because sfGuard works like that, and thats pretty cool. thx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Best way to test sending of emails in development?
i use the Swift SMTP Class for sending emails, there also is a plugin called sfSwift to easily install everything ready for symfony. As the smtp server i just use my regular mail hosts server. On May 15, 10:19 am, markchicobaby <[EMAIL PROTECTED]> wrote: > Does anyone test sending of emails in a WAMP or Windows development > environment? > > If not, what's the best way (or a good way) to do it? > > I can't get symfony to send emails in my test environment (WAMP, Win > XP). Tried a few ways keep getting errors etc, am on WinXP so I guess > that doesn't help. No response at all to my forum post on this topic > so I'm assuming very few people bother with it? > > Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---