Thread: [Semanticscuttle-devel] Is there a future for using a framework?
Brought to you by:
cweiske
From: Mark P. <mpe...@gm...> - 2011-02-19 03:20:56
|
On my sleepless nights, I've been reviewing some of the various PHP frameworks. I've played with Zend, CodeIgniter, a little CakePHP, and some others who have less of a following. Wanted to see if this was something that might be entertained in the future or is it simply too much overhead? What brought it on was looking at options to resolve some of the URL issues. I was looking at creating a simple routing class that allowed everything to flow through index.php, but kept getting drawn toward the use of a framework to do the routing. There are a number of benefits, but does also include some drawbacks. Thoughts? Mark Pemberton |
From: Mark P. <mpe...@gm...> - 2011-02-19 04:37:11
|
I don't claim to be an authority on this, but here's what I'm seeing on my Godaddy account. What I did was create a subdomain off my main account. And in that subdomain directory I copied the contents of Semantic Scuttle. Renamed the www folder to demo. Created database and launched. I was able to launch the app and register an account, but as soon as I logged in, I got the error "User with username demo was not found" so I did some troubleshooting and found that the PATH_INFO was returning "/demo/profile.php/markmark (where markmark is my username). Looking into the code it is essentially looking for PATH_INFO to return "profile.php/markmark". I was able to make it work by altering the line that parses the PATH_INFO but it was a hack to see if I could get it to work. I also performed an install on my home machine and created an alias /sc to the www folder and this works fine. I haven't attempted to alter my home machine to try and mimic my godaddy instance, but will probably do so this weekend. Now with that said, do I understand exactly what is causing it? Not completely. However, since there have been others who've had similar problems, I think we may benefit looking at altering the way we pull the URL information. I wouldn't call it simple, but it makes sense using a router class where all activity were to be routed through index.php. And obviously the next logical question is do we go one step further and adopt a framework and take advantage of some of the additional features of the typical framework? I know I probably didn't answer your question Chris, but I'd love to hear your experiences. Thanks, Mark Pemberton On Fri, Feb 18, 2011 at 11:05 PM, ch...@ch... <ch...@ch...>wrote: > Can someone provide a high level reason why clean URLs are so problematic > with Scuttle? I've never encountered the like with any other software! > > c > > On Feb 18, 2011, at 6:20 PM, Mark Pemberton <mpe...@gm...> wrote: > > > On my sleepless nights, I've been reviewing some of the various PHP > frameworks. I've played with Zend, CodeIgniter, a little CakePHP, and some > others who have less of a following. Wanted to see if this was something > that might be entertained in the future or is it simply too much overhead? > What brought it on was looking at options to resolve some of the URL > issues. I was looking at creating a simple routing class that allowed > everything to flow through index.php, but kept getting drawn toward the use > of a framework to do the routing. There are a number of benefits, but does > also include some drawbacks. > > > > Thoughts? > > > > > |
From: <ch...@ch...> - 2011-02-19 05:03:22
|
Can someone provide a high level reason why clean URLs are so problematic with Scuttle? I've never encountered the like with any other software! c On Feb 18, 2011, at 6:20 PM, Mark Pemberton <mpe...@gm...> wrote: > On my sleepless nights, I've been reviewing some of the various PHP frameworks. I've played with Zend, CodeIgniter, a little CakePHP, and some others who have less of a following. Wanted to see if this was something that might be entertained in the future or is it simply too much overhead? What brought it on was looking at options to resolve some of the URL issues. I was looking at creating a simple routing class that allowed everything to flow through index.php, but kept getting drawn toward the use of a framework to do the routing. There are a number of benefits, but does also include some drawbacks. > > Thoughts? > > |
From: Christian W. <cw...@cw...> - 2011-02-19 14:38:23
Attachments:
signature.asc
|
Hi Mark, > On my sleepless nights, I've been reviewing some of the various PHP > frameworks. I've played with Zend, CodeIgniter, a little CakePHP, > and some others who have less of a following. Wanted to see if this > was something that might be entertained in the future or is it simply > too much overhead? What brought it on was looking at options to > resolve some of the URL issues. I was looking at creating a simple > routing class that allowed everything to flow through index.php, but > kept getting drawn toward the use of a framework to do the routing. > There are a number of benefits, but does also include some drawbacks. > > Thoughts? I personally think that full-blown frameworks like Zend work for small projects only. Once the project gets big enough, they restrict you too much and you have to work around things that they do not want you to do. In the end, it's better to write the 3 things you need from it yourself. Note that I'm talking about helpers like their routers. What I like to use and favor is libraries that help you accomplish certain tasks, i.e. generating and validating HTML forms, generating feeds, communicating with some web service. The prime examples for such libraries are PEAR and Zeta Components. They are loosely coupled and each lib can be used standalone. Zend on the other hand doesn't even offer the download of single components, much less a pear channel server that lets you pick them. You always have to get their whole 200 pound package. SemanticScuttle is currently a bit less than 500kiB; adding ZF would move that up to 2.5MiB at least. That's no option for me. So, using libraries: Yes, absolutely. We already use PEAR's Auth package, and I began the quickform branch that uses PEAR's HTML_QuickForm2 for all form needs. Using a framework: No. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-02-19 14:40:42
Attachments:
signature.asc
|
Hi Mark, > PATH_INFO was returning "/demo/profile.php/markmark (where markmark > is my username). Looking into the code it is essentially looking for > PATH_INFO to return "profile.php/markmark". I was able to make it > work by altering the line that parses the PATH_INFO but it was a hack > to see if I could get it to work. Yes, that is exactly the problem. I also don't like the way URLs are handled in SemanticScuttle - that's inherited cruft from Scuttle, and we should change that. Having a central router would be fine for me; we'd need to go the full MVC route then with Controllers and separate views and may be even use smarty. Let's see. -- Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Chris L. <ch...@ch...> - 2011-02-19 17:29:05
|
I defer to the experts on these matters, I've just never had such problems getting clean URLs with the wide variety of CMS, blog, wiki, etc packages I've installed. So I was curious why Scuttle was an outlier. As for frameworks-- I'm only a PHP dabbler, but maybe there's a sweet spot in size: moving to Cake PHP for some projects made my life a LOT easier in the past. On the other hand, I don't know what you mean by large and whether that also involves the number of developers as part of the equation.While Cake (for example) would add considerably less size than Zend, it still has a considerable footprint!... c |