<br><br><div class="gmail_quote">On Sat, Aug 18, 2012 at 10:52 PM, Rouslan Placella <span dir="ltr"><<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Just in case you guys decide to change this class from a singleton to<br>
something else, may I recommend that this gets done after GSoC? As IMO<br>
such a move will create a whole bunch of conflicts for everyone to<br>
resolve</blockquote><div>I support it to be done after most GSoC development gets merged to upstream.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> and yet there is no clear advantage other than shorter syntax in<br>
this move.<br></blockquote><div>I think making it static would be a logical move as the class is just a collection of necessary functions and doesn't require instantiating in object-oriented sense.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Bye,<br>
Rouslan<br>
<div class="im"><br>
On 18/08/2012 18:22, Chanaka Dharmarathna wrote:<br>
> Hi Dieter,<br>
><br>
> First sorry for top posting. I'm using my phone to send this.<br>
><br>
> As I remember I discussed about this class structure in the mailing list<br>
> before. At that time I decided to use singleton pattern for this class.<br>
><br>
> Anyway, I got the point you mentioned. Since the class itself have no<br>
> properties singleton may not be essential here. I'll look more on what<br>
> are the pros and cons between these two approaches in this kind<br>
> background. Hope other also will share their ideas on this.<br>
><br>
> However, since I need to stop my work by tomorrow according to the GSoC<br>
> timeline (Carol ask to do so) I'll take the responsibility of any<br>
> necessary changes regarding this after GSoC session.<br>
><br>
> Regards !<br>
><br>
> Chanaka<br>
><br>
> On Aug 18, 2012 6:10 PM, "Dieter Adriaenssens"<br>
</div>> <<a href="mailto:dieter.adriaenssens@gmail.com">dieter.adriaenssens@gmail.com</a> <mailto:<a href="mailto:dieter.adriaenssens@gmail.com">dieter.adriaenssens@gmail.com</a>>><br>
<div class="HOEnZb"><div class="h5">> wrote:<br>
> ><br>
> > Hi Chanaka,<br>
> ><br>
> > I stumbled upon this piece of code (random pick) :<br>
> ><br>
> > PMA_CommonFunctions::getInstance()->backquote($_REQUEST['view']['name'])<br>
> ><br>
> > and it made me wonder if using a singleton for PMA_CommonFunctions is<br>
> > necessary, because basicaly PMA_Commonfunctions is a collection of<br>
> > methods, not really a 'living' object.<br>
> > So then I had a look at the class, and I discovered that the class has<br>
> > no class variables (apart from the _instance variable) and an empty<br>
> > constructor.<br>
> > So basicly this should be a static class, with static methods, because<br>
> > no instance is needed for it to work.<br>
> ><br>
> > And the above piece of code will become :<br>
> ><br>
> > PMA_CommonFunctions::backquote($_REQUEST['view']['name'])<br>
> ><br>
> > BTW: If you convert it to a static class, don't forget to replace the<br>
> > $this->method() calls by the static equivalent self::method().<br>
> > BTW2 : you forgot to add the if (! defined('PHPMYADMIN')), check in<br>
> > the beginning of the file, see [0].<br>
> ><br>
> > [0] <a href="http://wiki.phpmyadmin.net/pma/File_template" target="_blank">http://wiki.phpmyadmin.net/pma/File_template</a><br>
> > --<br>
> > Kind regards,<br>
> ><br>
> > Dieter Adriaenssens<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Atul Pratap Singh<div><a href="http://blog.atulsisodia.in/" target="_blank">http://blog.atulsisodia.in/</a></div><br>