473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Byte PHP framework

dlite922
1,584 Expert 1GB
I'd like to create a PHP framework based on the latest and newest PHP (5.3RC or 6.0 ) that is upcoming soon.

I mentioned this months ago, but now I have the time to persue it, Instead of making it "Dan's Framework", I'd like to make it 'Bytes PHP Framework' with the suggestions of you fine PHP experts.

My high-level goals are:

1. Under 10 Files and needs only PHP and MySQL
2. Targeted to those who want to get the basics out of the way and start coding the application logic from day one.
3. User manual will be under 10 pages (Including Examples), no special insight needed to learn to use it, or understand the code.
4. Any new person can learn it AND implement it within half an hour.
5. Completely whitebox (User can change the code without breaking anything)
6. Limited rules. Unlike CakePHP, ZendF, and others that outline pages upon pages of what methods are accessible, this framework will be so sleek, the entire API can be defined in one page.
7. MVC (of course) with Smarty templates
8. portable, fast, little overhead.
9. Not crowded with extra functionality (e.g. PDF converter, Multiple DB support MySQL only (but can be ported by user to other easily)).
10. Reliable, Secure, and Robust. ...and extremely LIGHT!!

Who's with me?

Tasks:

1. I need to get permission from bytes to use Bytes, otherwise find another name and open a sourceforge.net account for it.

2. Upload what I have so far for your review and feedback (it's 60% complete)

3. Have Fun!





Dan
Apr 23 '09 #1
46 4434
Markus
6,050 Expert 4TB
I'm down. Sounds interesting. 10 files or less? That does sound interesting, if a little optimistic?

Are we talking a full framework such as CodeIgniter, or a compilation of libraries?

Go sourceforge :D

I'm on with a couple of projects at the moment, but I would love to help out.
Apr 23 '09 #2
Dormilich
8,658 Expert Mod 8TB
you can count on me, but I insist on not limiting the manual (unless you have huuuge pages) – the more you document, the easier is troubleshooting.
Apr 24 '09 #3
Markus
6,050 Expert 4TB
Stuck.

To get it some more attention :)
Apr 24 '09 #4
dlite922
1,584 Expert 1GB
Sorry guys didn't have a chance to upload what I have so far. Not doing it now because the question of "where" popped in my head. Just attach it here? no.

Few things:

1. Do we have the OK to use bytes (identity) and hand over the source code to its community and the rest of the world?

2. First time launching an online group project, what tools do we need to keep track of a) code, b) Milestones/tasks and assignments, c) discussions/documents and other assets.... sourceforge.net provides all we need?

I've already submitted the project idea to sourceforge and is awaiting approval at the moment.

If sourceforge offers no code-versioning/management, I have a new-to-me HP server in my basement (HP 1U, P4 2.4Ghz 2G 40GB) that will be hosting my project sites. I can easily load SVN and use this to check the manual and codes in.

how does this sound?
Apr 28 '09 #5
dlite922
1,584 Expert 1GB
By the way, sourceforge.net project name is bytesphpfw

I'm going to work on explaining what I have so far to get you guys up to speed, and hopefully a start at some documentation but I have a confession to make: Writing technical documents is the least favorite thing for me to do and thus -- to be blunt -- suck at it. I would infinitely appreciate (and maybe compensate with online gift card) to anyone who loves writing and is good at it to take this challenge with help from rest of us of course.

PM me or reply here please



Thanks,



Dan
Apr 28 '09 #6
Dormilich
8,658 Expert Mod 8TB
you should use SVN to keep track of changes.
Apr 28 '09 #7
Markus
6,050 Expert 4TB
I prefer GIT, but I don't mind which we use.

Sourceforge, if you go to the 'project features' area, has everything you need: bug tracker, forums, task assignments, etc. You may have to look under the second tab (I forget the name of the tab) to see the features that aren't already enabled.

If some of the things you don't understand, SVN, Git, etc., there are lots of good resources on sourceforge.

Also, we should probably all have gmail accounts for real-time group discussions.

I wouldn't mind documentating it (gift card not required, of course :).

Be in touch,
Mark.

PS. Thank god we're not supporting PHP4 :D
Apr 28 '09 #8
Markus
6,050 Expert 4TB
Regarding the use of Bytes in the name: I'll ask on of the admins about it. I don't see it being a problem, though. After all, we had the Bytes Desktop thing.

Also, the source code will be freely available anyway, if we're using SVN (or something like) on SF.net
Apr 28 '09 #9
Dormilich
8,658 Expert Mod 8TB
@Markus
if there are participating more Mac users than me, we can consider using SubEthaEdit's Collaboration functions, too.

@Markus
yes, indeed
Apr 28 '09 #10
Markus
6,050 Expert 4TB
@Dormilich
NetBeans has a cool collab feature, too. I've not used it yet, but the manual says it *works*.

And no mac for me :(
Apr 28 '09 #11
dlite922
1,584 Expert 1GB
no mac either.

Markus, I'm confused at the sf.net interface, but I'll get use to it. I already use SVN at work and home so I'll no problem checking the code in as soon with that URL.

Dormilich, Thanks for taking on the docs. One of the goals is to have a short manual readers can go through in one sitting.

Do you guys have accounts on SF to add you to the project?

Also, I requested Mantis Bug Tracker, phpBB Forum and DotProject management "hosted apps".

Catch ya later,



Dan
Apr 28 '09 #12
Dormilich
8,658 Expert Mod 8TB
@dlite922
so, one extensive for debugging and insight reading and one to get started…

@dlite922
the only thing close to that is my beanstalk account

do you have anything planned for mail sending?
Apr 29 '09 #13
Markus
6,050 Expert 4TB
My SF username: mahcuz

Yeah, the interface is pretty confusing at first, but you get used to it after a while.
Apr 29 '09 #14
ak1dnar
1,584 Expert 1GB
Thanks to markus for making this thread as a sticky. if not for sure I'll never find it. I'm really less active these days on Bytes. But hopefully I can find more time withing next couple of months. It's a pleasure to here about the framework and I'd like to put some inputs from my end too.

SF is great system to host the projects but I do recommend Google project hosting for this.
http://code.google.com/hosting/ its not because of SF is bad, but its only because may be I'm a google lover.

Anyway have a look on this comparison chart
http://en.wikipedia.org/wiki/Compari...ing_facilities

Also I'd like join with you guys with the development if there is a space for me, but never ask me to write those documentations.

Good Luck with your project !!

EDIT!!
Also there is no other IDE like Netbeans
Apr 29 '09 #15
Markus
6,050 Expert 4TB
@ak1dnar
I think google code is good, but compared to the possible features you can have on sourceforge, it's nothing. You have CVS, SVN, Git, phpBB, TaskFreak, Project website (<projname>.sourceforge.net), FTP access to that site, MySQL databases for that site, Shell access, Wordpress, Tracker, and loads more. :D

It'd be awesome if you could be a part of the project, ak1dnar. :)

NetBeans is pretty awesome, it just takes forever to load. Whereas Eclipse loaded almost instantaneously, but then Eclipse was pretty crappy feature-wise (lots of plugins available, just not so easy to install and configure them.)

I love the UML plugin for NetBeans. Truly awesome.
Apr 29 '09 #16
ak1dnar
1,584 Expert 1GB
That's true Markus. SF provides a great system for project tracking. But most of those features may not require for small projects.

With my understanding we need (for now);
  1. Source Control system
  2. Issue/Bug Tracking system
  3. System for setting up Milestones
  4. Documentation System
  5. And a web Site to spread the word about the framework.

Point number 3 and 5 is not available on Google project hosting as I know. correct me if I'm wrong here. so SF is good because may be we have everything we need.

I just recovered my SF account password (Didn't use it after creating the account :D )
username: randika

Hope to see you guys there.
Apr 30 '09 #17
dlite922
1,584 Expert 1GB
Guys,

I added Mahcuz and randika as users and both of you should have SVN access.

I checked in (most of the) code from the last project I used my framework for: zankobooks.com to show you the code from a working site.

The code as it sits is, of course, very dirty compared to our final goal but it's definitely a start.

My plan was to "sit down" with you all weekend long and get the project underway, but unfortunately (?) I'll be with family on a little get-away in Colorado.

So I know tomorrow night I'll leave and won't have time to write this so I'll give you guys a brief description in the developer forum of what you're looking at so far but I know all of you can figure my simple code out easily, there's nothing special about it....yet.

Looking forward to a swarm of replies and ideas when I get back next week. Let's discuss everything so we can plan it out and avoid conflicts.

Thanks!

PS: Mahcuz (Markus), I've given you as much access as I could fine because...well frankly you've got a lot more time on your hands...and I trust you :)

May the Forge be with you!

(too corny?)



Dan
May 1 '09 #18
dlite922
1,584 Expert 1GB
...a little more about my feelings on this...(sorry)

I could see this as a gateway framework. One that is inspirational and makes every PHP lover take it and run with it to create they're own "unique" code they feel confident and secure with to do their applications with. What I have today was inspired by someone else that I improved upon and I want every soul that has fallen in love with PHP like me to take it and spread their wings with.

/okay, that's enough vodka for me

Good Night!



Dan
May 1 '09 #19
Markus
6,050 Expert 4TB
:D

Right, a couple of things:
  • Inline documentation should be done with either /* .. */, //, or #, not /** **/
  • PHPDoc should be:
    Expand|Select|Wrap|Line Numbers
    1. /**
    2.  * title,
    3.  *
    4.  * description,
    5.  *
    6.  * @access, etc..
    7.  */
    8.  
    notice the spacing before and after the asterisks.

That is all for now :)

PS. Thanks for the trust ;)

Also, I will return that passing insult you made, however true it may be. ;)
May 1 '09 #20
hoopy
88
Hi,

Would I be able to get involved in this in some capacity? Not so much on the development side as you seem to have enough people on that front but perhaps on the end user side?

I have always stayed away from frameworks in the past due to them appearing very bloated, instead writing my own libraries so if you are creating a very lightweight framework I would like to help test it.

Cheers.
May 1 '09 #21
Markus
6,050 Expert 4TB
@hoopy
Of course you can help out, but you do not have to just stick to testing.

Do you have a SourceForge.net account? If not, go make one, and I will add you to the member list of the project (PM me with your account name).

You should then go and check out (using an SVN tool, or by downloading a tarball). Give the code a look-see, run it and report any errors using the mantis bug-tracking tool.

:)
May 1 '09 #22
dlite922
1,584 Expert 1GB
@Markus

You ARE our target audience. A perfect tester indeed, but like Markus said you can give us your input since over the years of PHP development we may skip steps here and there.

The code is no shape to be downloaded and used (although it's copied from one of my working projects), but you'll know when the first version comes out if you participate with us.

Thanks!

(My last minute post before total silence of the weekends)




Dan
May 1 '09 #23
Markus
6,050 Expert 4TB
Have a good weekend, Dan.

Mark.
May 1 '09 #24
Slapo
8
I've been following this thread for a while.
I might give this one a go too once you manage to get something like a pre-release together (i.e. when it starts looking like what you want to achieve) - 60% complete might still be a bit too early.

There are a few things that seem to be too optimistic about this one, but I presume only time will show whether I was right thinking what I was thinking ;)

What size of projects do you reckon this framework will be usable for?

Lots of people only want to use a framework if they want to avoid writing more or less the same code, such as displaying tabular data, manage caching, users (logins and general security), forms, image manipulation, web services and so on.
Almost any decent framework allows you to strip it of classes you won't need for that particular project, making it rather lean.

By the way, I think you'll want to have something like ActiveRecord or ORM implemented eventually. Not because you'd be bored of writing the same SQL again, but because it might be faster to write, you won't have to bother with string escaping and, last but not least, if you'd have to migrate a project to a different database, you'd be thanking yourself.

I'm currently working on an e-shop, using CodeIgniter and so far the experience with it was very pleasant. Documentation is crucial - the one CodeIgniter has is excellent.
There are a few other frameworks that are appealing to me, but I haven't got to trying them out myself. They'd be Yii, Jelix and Seagull. I'm giving Yii a go today (or maybe tomorrow - I'll have to shut down the computer until my room gets painted).

I'm not sure I've actually written anything helpful, but I hope to stir a discussion with that.
May 2 '09 #25
dlite922
1,584 Expert 1GB
Slap,

You have great suggestions, but it's plugins like that, that scare many beginners away. To me it's easier to code than learn how to use -- or worse trouble shoot -- the framework code I'm using. I found myself doing this with the two most popular frameworks praised a year ago.

This framework still expects you to write most of the logic, you may ask well what's the point?

The point is to get people familiar with a "structured" PHP design to help them create secure, portable, and robust PHP apps and have PHP clear of some of the bad rep it's been getting due to beginners not using it write.

This framework will be a gateway to show how you can "lightly" use classes, an object, controller and a data access model to your benefit when developing apps.

These apps, while they may not be enterprise, can be as large as your typical blog, forum, eCommerce web apps.

I believe most frameworks lose their head in trying to code as much possible for the programmer that the programmer ends up trying to figure out just how much, and how it is implemented. Agility, Flexibility, and Usability suffers greatly resulting in a very steep learning curve.

In conclusion, while an expert can easily sit down and learn codeIgniter in one day and start developing, a beginner will be overwhelmed and result to coding scripts and not implementing any form of OOP.

We welcome any feedback or criticism and would love for you to be part of it, this goes for all byte members at any expert or beginner level.

(Yes I'm back in town! :D)



Dan
May 3 '09 #26
Slapo
8
Thanks for the response, dlite :)

How do you plan on routing URI parameters? I think that could influence a lot.
I see two sensible approaches at the moment:
1. use the usual form of parameters, e. g. index.php?c=main&amp;f=index
2. pseudo seo style, e. g. index.php/main/index or index/main/index (where there's only index, .htaccess or something similar would have to be used to force the webserver to feed it to the PHP interpreter; a question mark after index.php would probably be needed on IIS)

Both of these enforce using classes, although not lightly, but rather heavily, as the first two parameters (or segments in the second case) would be mapped to a class (parameter c) and a function (parameter f), with the rest of the parameters available freely to the programmer.

It's the way CodeIgniter does it (the second case) and it works very well in most cases. It's light on resources, unlike e. g. mod_rewrite.
May 4 '09 #27
Markus
6,050 Expert 4TB
I like the way codeigniter routes it's URIs. index.php/controller/method/other/stuff.

However, I think we need to determine whether this will be a 'glue' framework, or a 'full stack' framework (definition).

I'm too tired to say anything constructive right now.

Where's my coffee?
May 4 '09 #28
Slapo
8
@Markus
I'd suggest 'glue', as it gives flexibility both newbies and advanced users might like.
'Full stack' might feel more consistent, but if it would make integration of 3rd party classes difficult, it would become time consuming and there would be little point in using it further for many.

EDIT: ditch coffee, try mint tea ;)
May 5 '09 #29
dlite922
1,584 Expert 1GB
I think the conversation is going to where I thought it would, which is:

Define what the capabilities, usage, target audience, etc. To start coding anything, we must have a base line goal of what we're trying to achieve.

So maybe when I said 60% done, I got excited and way ahead of myself.

Which brings us to the next question: where are we going to have this "chat" since writing post replies could take forever on a conversation like this.

Google Chat? some other chat client and set up a time to discuss all of this.



Thanks,



Dan
May 5 '09 #30
Dormilich
8,658 Expert Mod 8TB
@dlite922
google chat or skype. though I won't be available until sunday (not too late, please)

I recommend to subscribe to the "recent activity" feed—makes for a faster notice if something changed or someone posted in the forum.
May 5 '09 #31
Markus
6,050 Expert 4TB
Google chat, google chat!

In retrospect, I have been using the code hosting on google recently, and I prefer it to Sourceforge. Just sayin :D
May 7 '09 #32
dlite922
1,584 Expert 1GB
don't go switchin' sides on me Markus :) , but Google chat it is. (send me link, my first time)

When?

We live in different parts of the world but i'm a night owl, I can stay up pretty late , no sweat.

Since weekends work better for most people, let's have it this weekend, Saturday or Sunday.

Some possible (GMT UTC+0) times for me are:

1. 16:00 to 22:00 , 2009\05\09
2. 05:00 to 08:00 , 2009\05\10
3. 16:00 to 22:00 , 2009\05\10

what will it be, fellas?
May 8 '09 #33
Dormilich
8,658 Expert Mod 8TB
I opt for 2, (I'm not available for 1 and 3 is quite late when you have to get up at 4 GMT)
May 9 '09 #34
dlite922
1,584 Expert 1GB
Okay, maybe this wasn't enough warning in advance.

Let's brainstorm on SF forum then. Throw your ideas, suggestions, and thoughts of what this framework should be like. we'll gather them all and put them in order later.

Because of the size of this framework, we won't code much. We'll program the core and offer "one" of the best ways to use it (by example). Users can take it from there.

I'd hate to plug it in with 50 billion functionality that won't be used by beginners or for every project.

I'll log on later tonight and post my thoughts and look for yours in the next few days. Dormilich or I can put it in a doc, check it in and make sure it looks good by everybody.

talk to you later guys,



Dan
May 10 '09 #35
Markus
6,050 Expert 4TB
My apologies for not keeping up with this; I've been limited with the amount of time I have on a computer - mine has died, lost everything including my full seasons of scrubs, the crazy amount of books (on programming and other things) that I had aquired, all of my games and films. Gah!

If we can set up a time and date for a convo (preferably towards late GMT) I'd be available.

Mark.
May 14 '09 #36
Dormilich
8,658 Expert Mod 8TB
until then you can think about which DB system we want to use (or just check out the SF forum)
May 14 '09 #37
Slapo
8
@Dormilich
The Help, Open discussion forum or a different one?
I can't see any other than welcome posts in the project forums on SF.

Can (and do) project developers have their own private forums or thread on SF?
May 14 '09 #38
Dormilich
8,658 Expert Mod 8TB
@Slapo
I meant the Developer Forum.

@Slapo
yup, for example the Developer Forum. If you want to ask something (meanwhile) use the Open Discussion Forum.
May 14 '09 #39
Dormilich
8,658 Expert Mod 8TB
if no-one objects, we proceed using PDO then…

any wishes how we implement it?
May 19 '09 #40
Markus
6,050 Expert 4TB
Sorry for not replying to your PM, dorm. Been busy. I will reply later today (job interview to go to at the moment.)

Mark.
May 19 '09 #41
Dormilich
8,658 Expert Mod 8TB
@Markus
what a coincidence, I got one next week. anyway, good luck and may the force be with you.
May 19 '09 #42
Slapo
8
@Dormilich
I think it would make sense to make it optional and interchangeable with ordinary drivers, so that the one using it can simply choose changing a line in a configuration file (if you plan on using one, which is probably a good idea if you'd include a line in the code that would disable viewing it directly).

Why would one want to use something else than PDO drivers? For drivers that don't have a PDO variant or that perform better than the PDO ones, for example.
May 19 '09 #43
Dormilich
8,658 Expert Mod 8TB
@Slapo
PDO is not a driver, it's a database abstraction layer. the drivers (meaning PDO_MYSQL, PDO_ODBC, etc.) have to be present in the PHP installation (which is usually the case, since PDO is part of PHP 5).

making it optional would be a pain, because the only other supported DAL I know of is MySQLi, which is less comfortable in getting the data and uses a completely different interface.

@Slapo
just a matter of constructing the DSN.

@Slapo
this I don't understand, btw how many people do you know, who haven't a PDO compatible driver?
May 19 '09 #44
Slapo
8
I know that the pdo extension itself is just an abstraction layer, but some cheap hosts don't have the pdo drivers, such as those you have mentioned, turned on. Then again, one could question whether it's sensible to use such hosts :P

Anyway, I was just thinking it would help making it more flexible.








That and I've found that my cheap (a. k. a.) free host has them turned on, so I guess I'm good to go now :D

EDIT: might be worth investigating whether the MS SQL Server php pdo driver will last when there's the sqlsrv driver. I'll try to look into that later today... or this weekend :P
May 19 '09 #45
dlite922
1,584 Expert 1GB
Then let's go with PDO keeping in mind that we should make it easier to add support for other databases as well. It might be just including one class and not the other while the access functions remain the same. This is what MVC is all about after all: The application logic can stay exactly the same if you change databases.

ie my call to $dbAccess->add($userVO); would do the same exact thing no matter what the underlying methods/dbms $dbAccess uses.

I'll try to code this week and test it with a PDO DAO (too many freakin' acronyms).

~Hope you guys get the job you interviewed for.~




Dan
May 20 '09 #46
Dormilich
8,658 Expert Mod 8TB
have a look at /core/DB.php. that's how I implemented PDO, maybe you can use it.
May 21 '09 #47

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Philippe Bertrand | last post by:
Using C#, I want to send a byte array to an unmanaged function with the minimum amount of copies. The array is input only and won't be modified (its copied on the unmanaged side). I'm currently...
1
by: Greg Patrick | last post by:
My problem: I load an some assemblies (strong named) from a byte array using Assembly.Load(byte). They load fine. But one one of them is actually accessed, it's referenced assemblies can't be...
4
by: Dennis Myrén | last post by:
Hi. Is there a way to utilize the great primitive data type formatting routines available in .NET without working with strings? I want a byte directly rather than a string. I think it is...
1
by: ORC | last post by:
Hi, I have posted almost the same message in the compact framework group, but it seems to got lost in a deep message structure :-) so I'll try again: I'll receive a byte array from a serial...
6
by: SStory | last post by:
I need to append to a byte array in a maximum of 256 byte increments. How?? dim x as fullbytearray() dim y as windowbytearray() 'y gets it's bytes (256 or less) need to x=x & y
2
by: Larry | last post by:
I have a Byte Array Dim A1() as byte = {1,2,3,4,9,9,9,11,12,13,14,9,9,9} I want to find the location of the first occurance of the byte sequence {9,9,9}. Is there a built in Framework class...
7
by: EOS | last post by:
Hi, I would like to ask on how to convert array of bytes, Byte into String? I tried StringIwant = System.Convert.ToString(byteData); but it actually return "System.Byte" rather than convert...
5
by: Marc Gravell | last post by:
Short version: is it possible to control the endian-ness of BitConverter? - or are there any /framework/ methods like BigEndianBitConverter.GetBytes(long) and .ToInt64()? (I am not after...
5
by: Trapulo | last post by:
Hello, I need to send to a webservice a parameter that is a string containing an XML doc. In this xml, a node value came from a byte array (it's an RSA signature). What is the best way to convert...
23
by: Gerrit | last post by:
Hi all, I'm getting an OutOfMemoryException when I initialize a byte array in C# like this: Byte test = new Byte; I'm using ASP.NET 2.0. In ASP.Net 1.1 it works fine. So what am I doing...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.