What's time consuming/boring/annoying/hard to you?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

What's time consuming/boring/annoying/hard to you?

Post by Benjamin »

I'm knee deep working on my framework right now. Trust me when I say that this is not the typical roll your own framework. This has been developed using a no holds barred approach and was started over 3 years ago. I'm reaching a point where I could use some input because I want it to be as useful and practical to experienced developers as possible. With that in mind I have a few questions. Answer one or answer them all. All community input will be great!

1. When coding a project, what is the most time consuming to you? How long would you say you spend on this? Why is it time consuming? Please exclude unit tests. If your answer is design related, please state what your designing.

2. What would be your favorite feature of the framework of your dreams? Keep it real. Reading your mind and completing projects for you using AI are not valid answers;) In other words, if you had the framework of your dreams installed on your computer, what would you like the most about it?

3. If you currently use an existing framework, what are you favorite features and why?

4. If you currently use an existing framework, what do you dislike about it and why?

5. As far as features go, what do you feel is the dividing line between what a framework should and shouldn't do?

6. When tracking down a difficult bug, what information would be most valuable to you?

7. Assuming you have never used a framework before, or have never been interested in using a framework before, what is the most important issue to you, which would cause you to decide not to use a framework?

8. Assuming you are familiar with frameworks and have a framework of choice, if you started a new project, what would prevent you from using a framework you have never used before?

9. How would you feel about changing your "style" of coding if it meant a significant increase in productivity without sacrificing quality, readability or performance?

10. Specific to you writing code, how transparent should the framework be? In other words, do you want to interact with the framework itself and hack the code, or would you prefer to just have the framework take care of its job silently in the background, while you can do as you wish with minimal direct interaction.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: What's time consuming/boring/annoying/hard to you?

Post by Chris Corbyn »

1. Writing the domain objects, mappers and finders in our Sitepoint framework (I prefer the simplicity of propel). Writing forms for user input (fundamental, but *yawn*).

2. It wouldn't be PHP4-compatible. It would be well written. It wouldn't push me into a corner and make me do things the way it thinks they should be done. It would have a flexible view layer. Rails-style URL mapping.

3. Personal projects use symfony. Fave features are: YAML config just seems to work awesomely. The view is great (but many people disagree with me). It employs propel. The dev community are really helpful. The URL mapping is beautifully clean and easy. At work we have a custom framework I'm not sure I can divulge much information about or not, but I *love* the level of separation of concerns in it. It's very much a "glue" framework which oftens means writing more code, but it means testing that code is so blindingly simple since components can stand almost entirely by themselves. Perhaps the fact it was built using TDD from the ground up has helped.

4. symfony... I don't like the way it so tightly couples the view to the controllers. That's it. The SitePoint framework, no complaints which I cannot reason with, apart from a few weird implementation details.

5. I expect a framework to allow me to create pages with a view and a model with some consistent API (e.g. a particular ORM or basic domain object-mapper-finder setup). I expect some form of filter/validator and I expect a routing system. Anything else is either a bonus or fluff depending upon what it is.

6. Existing unit tests a could add to?

7. N/A

8. The fact I have no real complaints with the one I'm using and would go so far as to say, very happy with it. Also the fact I don't want to spend an unnecessary amount of time learning a new framework to do things I'm already doing happily.

9. Very open minded, but only if "increase in productivity" didn't boil down to "writing repetitive spaghetti code". I also wouldn't want to be *forced* into changing the way I write code.

10. I want the framework to provide me with the basics and then get out of my way ;)

EDIT | I can probably summarise everything I just wrote as "I would rather a framework be a basic infrastructure than a box full of neat features.
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: What's time consuming/boring/annoying/hard to you?

Post by Inkyskin »

I am an experienced developer, but I dont really use frameworks. I have played around with them, but never used them properly in a live site. I hope this feedback is of use to you!

1. Designing the initial template - making sure all possible variations are done. Also, on the same note as Chris, FORMS. Damn things.

2. Having not used a framework properly yet, I'd have to say something that would bring the rails style MVC together properly within PHP.

3. Not using one.

4. Not using one.

5. It should make my life easier, my code more effecient(sp?), and make my file structure better formatted.

6. A full and descriptive error message...?

7. A lack of good documentation.

8. Time - If it was tooo different from what I had used etc, I would put it off for something smaller / less reliant on a fixed timescale.

9. Happy to, so long as these points were fulfilled.

10. I would want the framework to work silently - but for it not to be difficult if I did want to play around with the code.

Okay, I did the survey, when do I get my free Ipod?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: What's time consuming/boring/annoying/hard to you?

Post by shiznatix »

1. Writing user-input forums and then doing the error checking on them. I hate doing this because its so tedious and boring.

2. Easy separation between the template, view (where i build my variables to put in the template), and the controller (where i like to put the error handling and the sort). I made my own that did just that but my work is forcing me to go with something more commercial incase i get hit by a bus (or pushed infront of one :wink: )

3. I use Zend and I like its flexability. If I want to do something my way, I can. Easy breezy.

4. I dislike Zends database layer and session handling. Just gets a bit confusing.

5. It should not force me to take extra steps to do something that can be done in less. It should just make coding easier.

6. A complete dump of everything and the path that a script has taken (opened controller A, into init method, into method B, open model C...) until the script dies down (have the script die on error)

7. Wanting to do everything myself

8. Comfort level. I am comfortable with my framework of choice, I know how it works, why bash my head in for something else when it does everything I need?

9. Don't mind. I scream for a day then get over it. I just did it when switching to Zend (I used $varible_names and function_names() but to conform to Zend I use $variableNames and functionNames())

10. Minimal direct interaction. Its nice to be able to hack the framework a bit but when it comes time to update the framework version, do you really remember all those essential inner changes you made that are about to be overwritten?

Back to being bored, annoyed, and in pain from bashing my head while I finish the final touches to v3 of our site!
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Re: What's time consuming/boring/annoying/hard to you?

Post by JayBird »

1. FORMS :banghead:
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Re: What's time consuming/boring/annoying/hard to you?

Post by malcolmboston »

i agree, forms are by far the most mundane part of programming.

However id say im getting pretty bored with PHP / programming in general :oops: I guess all programmers go through this phase though
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: What's time consuming/boring/annoying/hard to you?

Post by alex.barylski »

In other words, if you had the framework of your dreams installed on your computer, what would you like the most about it?
It would assist in me getting DRY - better than a towel anyways. :P
As far as features go, what do you feel is the dividing line between what a framework should and shouldn't do?
I don't think there is a division of where a framework, stops being a framework. Rather, the 'type' of framework changes. There are general purpose frameworks, like Zend, then there are full blown application frameworks like the countless CMS's out there that support mini-applications or modules. Using the latter, you loose some flexibility but make up for it in development time, so long as exacting control over your interface isn't required, etc.
When tracking down a difficult bug, what information would be most valuable to you?
When I change DB schema, even just dropping a single field, that can reverberate across the system. Usually a quick grep will tell me where all that variable instances are, but I frequently have to manually go through each one.
Assuming you have never used a framework before, or have never been interested in using a framework before, what is the most important issue to you, which would cause you to decide not to use a framework?
Simplicity has to be the major factor. If it isn't easy to use immediately upon download, you've lost most of your community. Don't introduce front controller right away, start with a simple script and demonstrate a useful helper object and progressively get more complicated. Unless you have a skeleton generator which can ask for the number of inputs and generate a full scale skeleton application, demonstrating this as a beginner tutorial will be detremental to your success.
Assuming you are familiar with frameworks and have a framework of choice, if you started a new project, what would prevent you from using a framework you have never used before?
Like most PHP developers, I already have one, and at just under 2,000 lines...it's light weight...flexible...minimized dependencies and allows me to hammer out applications at a speed I'm confortable with. I would more likely look at your code and borrow any good ides and integrate them into my own. :P Where is this framework?
How would you feel about changing your "style" of coding if it meant a significant increase in productivity without sacrificing quality, readability or performance?
If it made more sense than what I do right now, sure I'd switch. I've spent years refining my own conventions though and every day I document a best practice when using my own framework...so for someone that already uses a framework...that might be difficult unless your framework erally offerws something unique and advantageous.
Specific to you writing code, how transparent should the framework be? In other words, do you want to interact with the framework itself and hack the code, or would you prefer to just have the framework take care of its job silently in the background, while you can do as you wish with minimal direct interaction.
Both! When I'm working on application level code, I don't care what or how my front is doing. At the same time, when something could be solved more elegantly than whats possible in applicaiton code, it's time to integrate that code into the framework so it can be reused.

That is probably the biggest reason I choose to roll my own...just for that intimacy I have with my own framework.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Re: What's time consuming/boring/annoying/hard to you?

Post by Jenk »

Generally it's tidying up code that's the most boring. Be it mine, or others code.

I am facing the collosal task of migrating a 14 year old VB application, which has received shoddy hack after shoddy hack, to Smalltalk. The quickest and most cost effective would be a near-as-possible like for like migration, then release and continue to refactor in the background. I do not want to do this, and am trying to convince the powers that be, that it would be more beneficial to start as if it were a new project in Smalltalk. One of my bosses agrees, unfortunately the other two don't.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: What's time consuming/boring/annoying/hard to you?

Post by Benjamin »

Awesome answers everyone. There is some good stuff in here. I'm surprised no one said anything about validation code.
Chris wrote:Writing forms for user input
I've been thinking about this for a few years and I think I have a decent solution. This isn't something I have integrated into the framework just yet but it's in the works and will be started shortly.
Chris wrote:It wouldn't be PHP4-compatible
No kidding. It isn't and never will be ;)
Chris wrote:YAML config just seems to work awesomely
How about no config files even needed?
Chris wrote:I expect a framework to allow me to create pages with a view and a model with some consistent API
The model and view in my framework may be a little bit too close for comfort to each other for some. I originally designed the framework so that there was separate files for code and html, but the two have been merged after I built a few sites using it because they increased development time. Template files are separate obviously. Maybe diehard MVC fans can find a happy medium by using class files as the model? Forgive me if I sound ignorant.
Chris wrote:I expect some form of filter/validator
You mean a general purpose validation class? I've got this one beat.
Chris wrote:I expect a routing system
I believe this has the routing system to end all routing systems. You'll be able to add a complex URL map with a 1 liner.
Inkyskin wrote:A lack of good documentation
Once the framework is finished I'll have to write up some good documentation for it.
Inkyskin wrote:Time - If it was tooo different from what I had used etc, I would put it off for something smaller / less reliant on a fixed timescale.
This is one of the main reasons I wrote this framework. As a developer I know my time is limited. I can't spend a week or two learning how to write code for a framework. I wanted a framework I could just unzip and start coding in. I've developed mine that way. You can upload it to a webserver and run it. If you need a database connection just add your password to the config. If you need a cache just set the cache value to true, if you need memcache just turn it on in config.

The framework has been designed so that everything is used/turned on, on an as needed basis. The framework will not even initialize a database connection until it receives a database query request.

I think a majority of developers will be able to unzip this, read a short 5 or 10 minute introduction and be knee deep in writing code very quickly, without a steep learning curve.
shiznatix wrote:Writing user-input forums and then doing the error checking on them. I hate doing this because its so tedious and boring.
Yeah this almost never fun. I got this one.
shiznatix wrote:It should not force me to take extra steps to do something that can be done in less. It should just make coding easier.
No kidding!
shiznatix wrote:A complete dump of everything and the path that a script has taken (opened controller A, into init method, into method B, open model C...) until the script dies down (have the script die on error)
You mean like this? http://astions.com/dump.txt
Hockey wrote:When I change DB schema, even just dropping a single field, that can reverberate across the system
This framework has a dev panel where you can view failed and slow database queries, and link it to a system snapshot so you know exactly what happened on that page request and nail down the error or bottleneck.
Hockey wrote:Where is this framework
In my repository! It's not ready for release yet, still have to add some features and fine tune a few things. I'll give you guys a first go at it though:)
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: What's time consuming/boring/annoying/hard to you?

Post by Inkyskin »

Well, it does sound interesting :) Any idea on a rough timescale before we see a version?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: What's time consuming/boring/annoying/hard to you?

Post by RobertGonzalez »

1. Making sure things are as loosely coupled as can be. I screw this up repeatedly, but strive for loose coupling and loose dependency.

2. Simplicity in rolling out a page, action, full site or just a database result.

3. I rolled my own framework for work (called Ironclad) that is modeled after my own framework (called Padlock). This was modeled after Solar, a codebase that I believe is one of the classiest things to hit PHP in a long time.

4. Well, since I use my own, I like everything about it. When I find something I don't like, I change to what I do like. :)

5. I think a framework should offer the develop a set of tools with which they can easily do whatever they need to do. If you want to quickly build a small script that calls a stored procedure in Oracle and times the query call while giving you memory usage and data statistics, it shouldn't take all day to write nor should it encompass too much pure PHP. Same goes for if you want to roll an entire application.

6. File name, line number, calling/including page.

7. The API documentation. If it is too cryptic or seems like it was written by a programmer for a programmer, then it will probably turn me off.

8. Having to tweak my server settings, my PHP settings or my desired structure to accommodate the framework. The framework should be able to plop right on top of my server and work. (My framework does not meet this criteria by the way, but it is something I desperately want).

9. I am ok with it. In fact, for my framework I did just that. Almost 180 degrees.

10. I want the framework to be adaptable. If I want something simple, I want to be able to write something like:

Code: Select all

<?php
require 'Framework.php';
Framework::start();
Framework::display();
Framework::stop();
?>
Or if I need something more intense but finer grained, I want to be able to do something like this:

Code: Select all

<?php
$mssql = Framework::get('db-mssql'); // Get the mssql handler
$form = Framework::get('form'); // Get the form object
$request = Framework::get('request'); // Get the request object
 
// Build the form
$form->build('contact');
 
// Check the form and handle the data
if ($request->post()) {
  if ($form->validate()) {
    $mssql->execute(Framework::get('queries')->addContact($form->values));
    if ($mssql->hasError()) {
      // Handle the error how you want
    }
  }
}
 
$form->render();
?>
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: What's time consuming/boring/annoying/hard to you?

Post by alex.barylski »

Can we see a quick demonstration of the most interesting part of most frameworks - The MVC components and their interaction.

Does your framework use convention or configuration to load the models automatically? How about the Views?

What would each component look like in a quick skeleton app?

I'm always interested in seeing how others solve these issues as I find these are what really set the approach to solving problems when using a particular framework.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: What's time consuming/boring/annoying/hard to you?

Post by Benjamin »

Inkyskin wrote:Any idea on a rough timescale before we see a version?
Bare minimum of 3 months I would say. I don't want to release it until I'm happy with it. If I released it earlier and people thought that it sucked, that would be hard to overcome.
Everah wrote:Simplicity in rolling out a page, action, full site or just a database result.
I hear that. This was one of the main design goals.
Everah wrote:Well, since I use my own, I like everything about it. When I find something I don't like, I change to what I do like.
Sounds like I have some tough competition:)
Everah wrote:File name, line number, calling/including page.
Done, done and um, I can't find a practical way to do that without parsing debug_backtraces all over the place, but with the coding style involved, you probably won't need that much detail to track down things. The database classes do however enable this feature in order to track down where a query came from.
Hockey wrote:Can we see a quick demonstration of the most interesting part of most frameworks - The MVC components and their interaction.
Interesting question. The truth is that this framework provides a solid base from which to work on. The main thing that turned me away from other frameworks is having to setup all these different things and then run a script to implement it. I don't want to get into too much detail about how everything works under the hood yet, but I will say this..

The url http://domain.com/directory/subdirector ... ng/foo/bar will resolve to /var/www/html/directory/subdirectory/something/foo/bar.php. BUT, and this is a big but, you can intercept this request in any of the parent directories. So for example in the directory named subdirectory I can write a one liner that will prevent it from resolving into any of the children directories. So now the url resolves to /var/www/html/directory/subdirectory/index.php and you would have an array with the values "something", "foo" and "bar" that you can do as you like with. These interceptions can be fully conditional as required.

Now with this array of values, if you want to hook those into classes and methods you can. If you want to use them as identifiers to run database queries and pull results you can. You can do whatever you want with them, it's up to you. All this is done without modifying any .htaccess files.
Hockey wrote:What would each component look like in a quick skeleton app?
You can put them wherever you want. It's up to you. The urls resolve to real paths which are in a subdirectory of the framework. You can intercept these as needed, so the path doesn't necessarily have to be real.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: What's time consuming/boring/annoying/hard to you?

Post by alex.barylski »

The main thing that turned me away from other frameworks is having to setup all these different things and then run a script to implement it
I think thats why many people appreciate Zend...there is very little boiler plate code needed to just get started...as you learn and incorporate more and more, Zend grows with you, not against you.

Can you disclose any ideas you may have borrowed from existing frameworks? How about how you improved upon them?

Cheers :)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: What's time consuming/boring/annoying/hard to you?

Post by Benjamin »

Hockey wrote:Can you disclose any ideas you may have borrowed from existing frameworks? How about how you improved upon them?
Ever since I started writing PHP code I have been looking for and developing shortcuts. One day the thought came into my mind that maybe someone else already had developed these. I searched for accelerated development environments for php. I think back then the top result was for Ruby on rails. I watched a few of the videos and thought "What the hell is this?" If I remember correctly you could make a blog in 15 minutes. But I didn't see any data validation anywhere. I saw scaffolding that would take a database schema and create the save/update/delete and list pages. I started looking at other frameworks and they were all pretty much the same.

I downloaded the source code for a few frameworks such as Zend, CodeIgnitor, Smarty etc and had a very brief look at the code. What I saw disturbed me. Zend requires Pear, Smarty was insanely bloated and CodeIgnitor as well as Solar seem to be lighter versions of these, all operating the same way. The code (to me at least) didn't seem very pretty in any of these either. I shouldn't have to edit 4 files, add a url mapper and controller for a single static page. I should just be able to upload it and be done. Maybe there is a way to simply add a static page but if not, these developers have lost their mind.

My framework does not contain "borrowed" ideas. It combines things that I found helpful and what I would expect out of a framework. When you have 15 different tasks to complete, and each task takes you 20 minutes, that ends up taking 5 hours of time. The goal of my framework is to save time on all these little small tasks. If I can make these 15 twenty minute tasks trivial and you can end up completing them all in a few minutes, I've just saved you 5 hours of time - Over and over and over and over again.

There is a good resource locator class on this board someplace. I can't remember off-hand who made it but I thought it was a very good concept. I will be expanding on the resource locator in my framework and I may use it as a model.
Post Reply