SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question what's framework ?

    there are alot of articles suggest using framework when developing php applications.

    what does framework do ?
    how does it help developers?

    when i develope an application, my eviroment would be
    IIS+MySQL Server+PHP+Editer+Browser(IE+FF+Opera)

    what else i need to develop application ?

    what am missing? please enlight me.


    Examples i have noticed: PRADO, CakePHP and Zend Framework
    Never be shy to ask silly Qs
    An answer is always better than none

  2. #2
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Frameworks are a collection of prebuilt classes that help you develop an application.

    It has nothing to do with your development environment or application and everything to do with application development.

    It consists of classes that do the lowend work for you. Like Database Abstraction layers, Request, Validation and other components that are common with most applications.

    It's main purpose is reuse and logic control and interaction of the classes within the application architecture.

    It's a very popular subject, so feel free to google for definitions.

    Regards,

  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by melancholic
    Frameworks are a collection of prebuilt classes that help you develop an application.
    You could say the same about a library such as Vincent's Eclipse, but that is not a framework.
    Quote Originally Posted by melancholic
    It has nothing to do with your development environment
    With respect, Melancholic, I think you might be missing the point. As I see it, one of the primary features of a framework is that it organises the file system for you, in which case it has everything to do with your development environment.

  4. #4
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://en.wikipedia.org/wiki/Framework

    Quote Originally Posted by Wikipedia
    In software development, a framework is a defined support structure in which another software project can be organized and developed. A framework may include support programs, code libraries, a scripting language, or other software to help develop and glue together the different components of a software project.

    Frameworks are designed with the intent of facilitating software development, by allowing designers and programmers to spend more time on meeting software requirements rather than dealing with the more tedious low level details of providing a working system.
    So you can think of a framework as the "common bits" you could extract from multiple projects you have worked on.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  5. #5
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by sweatje
    So you can think of a framework as the "common bits" you could extract from multiple projects you have worked on.
    Hisham, Sweatje hit the nail on the head there! Once you've written a number of applications, you'll always find yourself writing pieces of code you've written before, or simply copying them from one application to another. A framework in its simplest form is simply a collection of these pieces of code that you use all the time.

    Instead of rewriting all these common bits, you then already have them and can get stuck into the interesting new bits of your new application.

  6. #6
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Martin Hall
    You could say the same about a library such as Vincent's Eclipse, but that is not a framework.
    So the term "framework" doesn't include this definition? Does it not also have collections of classes that work together?

    For instance, in a framework that I am using, There is a front controller which works together with an application controller along with a service locator which calls a class and caches the object for later use by the model. There is also my view class which uses a language and html helper view helper classes which all work together.

    Would you say that this is not a description of classes and objects working together?

    Your comment is counter productive and offers nothing to answer the question at hand. But try to correct an already correct answer. While it is true for libraries, it does not make my answer to be wrong.

    Quote Originally Posted by Martin Hall
    With respect, Melancholic, I think you might be missing the point. As I see it, one of the primary features of a framework is that it organises the file system for you, in which case it has everything to do with your development environment.
    With respect indeed! Don't worry about me, I've got the point. I was refering to his reference to "development environment" in which case he has stated.

    when i develope an application, my eviroment would be
    IIS+MySQL Server+PHP+Editer+Browser(IE+FF+Opera)
    By the way... the term "development environment" and "application environment" are two different things.

    The system organisation that you refer to has everything to do with the application and NOTHING to do with your development environment.

    You think I've missed the point? I think it's you who missed the point...

    Regards,
    Last edited by melancholic; May 27, 2006 at 20:10. Reason: removed silly emoticons and lowered the tone of the last line of my reply - too harsh...

  7. #7
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Immerse
    Hisham, Sweatje hit the nail on the head there! Once you've written a number of applications, you'll always find yourself writing pieces of code you've written before, or simply copying them from one application to another. A framework in its simplest form is simply a collection of these pieces of code that you use all the time.

    Instead of rewriting all these common bits, you then already have them and can get stuck into the interesting new bits of your new application.
    hisham777 was asking about Zend, Cake, CodeIgniter, etc.
    If your framework must consist of your own previously-written code, how do you get started?

    Melancholic, to me the organisation of the file system is very much part of the development environment and is a very significant feature of the kind of frameworks hisham77 wants to know about.

    Would you say that this is not a description of classes and objects working together? I would say it is not a useful description of a framework in the context of hisham77's question.

  8. #8
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A framework is not only comprised of one layer or class hierarchy though. A framework could be something as simple as being able to parse an XML structure, ie RSS for example. What is built upon this RSS framework is an application.

    But... What else utilises the RSS framework may well be another more complex and larger framework as well; This other framework may be a method to appropriate the data structure for formatting and output.

    See how easy it would be (now) to develop the application required?

    Your new application would need to know little about XML in that event, all it'd actually need to know about is the common data structure that was returned formatted for output; If you want to do CRUD the framework expects that same common data structure, from the client (your application in this case).

    The framework does the rest for you...

  9. #9
    SitePoint Zealot
    Join Date
    Feb 2003
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I usually use the words framework and library in the following ways:

    A Library for me is a collection of classes or functions that offer some specific functionality, that I can use via a simple interface. Apart from the function-calls a library usually has little influence on the internal structuring of my application.

    A Framework is a library which does have a considerable effect on the internal structure of my application. This is because it makes a lot of assumptions about what the programmer wants to achieve. As long as the programm[er] "matches" those assumptions and stays within the "known paths", the programmer's work is considerably reduced with respect to certain aspects which are automated by the framework.

    Usually a library can be more easily replaced by a functionally equivalent library, than would be the case for a framework, because the framework will be more intervowen with my application's code.

  10. #10
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you all for all this information now its much clearer.

    and thats bring to ask (let me know if i should start it in a new thread )

    am just picking up PHP no knolwage of OO style of coding but i do understand a bit
    of the OO theorys like inherten Polimorphisem..etc i learn it from C++.
    however
    i would much love to start OO coding using PHP and Design as well using UML
    as a matter of fact all be going to MPH to find Book or 2 about PHP OO and UML

    so base on the above what Framework do you recommend to use for someone just picking up PHP, and just starting OO with PHP.

    and whats your recommendations on a book of UML to who want to design Applications for WWW.

    What do you think of this Book

    Professional PHP5 (Programmer to Programmer)
    Edward Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove

    thanks
    Never be shy to ask silly Qs
    An answer is always better than none

  11. #11
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > those assumptions and stays within the "known paths", the programmer's work is considerably
    > reduced with respect to certain aspects which are automated by the framework.



    For example, nowadays my applications consume the IDataspace Interface in various degrees of use; With the IDataspace Interface being simple but effiecent I can achieve a lot more but with a lot less, but in doing so, still staying within the boundaries provided by the framework.

    There are about another dozen Interfaces or Abstractions that I can make use of in that same regard at the moment; It's very effective

    I would reccommend the Symphony framework at the moment (note I may have spelled it wrongly) but also keep an eye on Zends framework just for the possibility that it may mature to be something of much greatness in the future, Ie Maybe in time for PHP6 being a consideration I imagine?

  12. #12
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hisham777
    what Framework do you recommend to use for someone just picking up PHP, and just starting OO with PHP.
    In your situation I would be looking for a relatively clean and simple Framework to begin with. I think CodeIgniter might suit you; alternatively Cake seems to be popular and less complex than some of the larger products.

  13. #13
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by R. U. Serious
    A Framework is a library which does have a considerable effect on the internal structure of my application.
    I like that; it says a major part of what I was trying - and evidently failing - to put across.

  14. #14
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Martin Hall
    Melancholic, to me the organisation of the file system is very much part of the development environment and is a very significant feature of the kind of frameworks hisham77 wants to know about.
    I am not discounting the file system and organisation of the file system of the framework's "Application Environment" to not be a feature of the framework the author wants to know about.

    But what you describe about the file system is not the "development environment" and IS NOT called a "development environment" and if you are calling that, you should stop it. Because it's the wrong terminology.

    A development environment refers to something that a developer uses when developing an application not the framework itself, if you wanted to extend the term you could go so far as to say that a framework is part of a development environment but to say that the framework has a development environment is wrong.

    Quote Originally Posted by Martin Hall
    Would you say that this is not a description of classes and objects working together? I would say it is not a useful description of a framework in the context of hisham77's question.
    It's not up to you to dictate what information is useful or not. At least the information I provide is correct and although deemed arrogantly by yourself as not useful:

    1. it IS correct
    2. Fits in the description of the puzzle and lays the foundation for further discussion.

    If you felt that it was incomplete, then you could have taken a more positive route and expanded on points instead of standing on your soap box preaching how people have "missed the point" and giving wrong, pointless, overused rhetorical examples.

    ...

  15. #15
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Martin Hall
    I like that; it says a major part of what I was trying - and evidently failing - to put across.
    It's because you were using the wrong terminology and people couldn't understand you

    "development envirnment" != "application environment"

    Sorry I'm just hounding you now, that whole pompous "what you're saying is useless" crap you said in your previous post really gave me the sh*ts.

    In which case, I know it's petty and I'll stop.

  16. #16
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by melancholic
    It's because you were using the wrong terminology and people couldn't understand you

    "development envirnment" != "application environment"

    Sorry I'm just hounding you now, that whole pompous "what you're saying is useless" crap you said in your previous post really gave me the sh*ts.

    In which case, I know it's petty and I'll stop.
    Your comments have no resemblance to anything I have actually posted.

    "development envirnment" != "application environment"
    I said nothing about that.

    pompous "what you're saying is useless" crap
    Your interpretation, not my sentiment. Perhaps your insecurity has made you paranoid.

    The original poster asked about Cake, Zend, etc. which nobody, including you, actually said anything about. On installation, these products set up a file organisation which is fundamental to the whole development. Ignore that and you miss the point.

    Your insistence on your own narrow idea of "correct" terminology is rather sad, but not surprising.

  17. #17
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Martin Hall
    In your situation I would be looking for a relatively clean and simple Framework to begin with. I think CodeIgniter might suit you; alternatively Cake seems to be popular and less complex than some of the larger products.
    am viewing the site and the user guide it sime its a good starting point,
    no template system...etc
    its very basic which what i need to get started.


    thanks Martin apriciated
    and thanks all for making framework idea clearer.

    cheers
    Never be shy to ask silly Qs
    An answer is always better than none

  18. #18
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hisham777

    What do you think of this Book

    Professional PHP5 (Programmer to Programmer)
    Edward Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove

    will i will still apriciate someone give me some comments about this book
    Never be shy to ask silly Qs
    An answer is always better than none

  19. #19
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hisham777
    will i will still apriciate someone give me some comments about this book
    Sorry, I haven't seen that PHP5 book.
    A word of caution: although PHP5 has better support for OOP programming concepts, it doesn't seem to have been widely adopted by web hosts so far.
    Try to be aware of the significant differences between PHP versions regarding OOP. For example, PHP4+ doesn't have abstract classes or enforceable scope (public/private/protected) visibility. PHP5 does have those features, but I couldn't tell you whether it's worth buying a book which you might not be able to put into practice until there's been a lot more adoption by hosting companies. If that is not a consideration - maybe because you expect to spend quite a while in the learning/development stage - then PHP5 will certainly help you write more disciplined code.
    Good luck!

  20. #20
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just follow the KISS principle, and don't get too much exagerated eith frameworks

  21. #21
    SitePoint Guru hisham777's Avatar
    Join Date
    Dec 2005
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you all for the information.

    conclution

    -i shall start reading about OO in brife
    -read about UML style of design
    -read and practice about OO PHP (class Public, privet...etc)
    -start with a basic project. design and code it using OO
    -start using a basic Framework Like CodeIgniter
    -then move to pattern (or may be you suggest start learn design bettern earlyer)
    -then am set i guess

    again thank you all
    Never be shy to ask silly Qs
    An answer is always better than none

  22. #22
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I said I was going to stop but I'm not going to swallow such remarks.

    Quote Originally Posted by Martin Hall
    Your insistence on your own narrow idea of "correct" terminology is rather sad, but not surprising.
    Sad but not surprising?! what's that supposed to mean?

    Screw the terminology you can believe whatever you wish.
    Quote Originally Posted by Martin Hall
    Melancholic, to me the organisation of the file system is very much part of the development environment and is a very significant feature of the kind of frameworks hisham77 wants to know about.
    Development Environment is the file system of the application... yes right.

    Quote Originally Posted by Martin Hall
    pompous "what you're saying is useless" crap
    Your interpretation, not my sentiment. Perhaps your insecurity has made you paranoid.
    Ahhh, so I must have misread when you said

    Quote Originally Posted by Martin Hall
    I would say it is not a useful description of a framework in the context of hisham77's question.
    I'm sorry I must have had you figured wrong. To me that meant that what I was saying was not useful hence useless. To you it might have meant something else. You can't go around saying stuff like that. It's rude and arrogant.

    Quote Originally Posted by Martin Hall
    The original poster asked about Cake, Zend, etc. which nobody, including you, actually said anything about. On installation, these products set up a file organisation which is fundamental to the whole development. Ignore that and you miss the point.
    You must have skipped the whole of the initial post including the subject line and read the last line.

    there are alot of articles suggest using framework when developing php applications.

    what does framework do ?
    how does it help developers?

    when i develope an application, my eviroment would be
    IIS+MySQL Server+PHP+Editer+Browser(IE+FF+Opera)

    what else i need to develop application ?

    what am missing? please enlight me.


    Examples i have noticed: PRADO, CakePHP and Zend Framework
    That's what I and the others read. To me the last line was just examples of frameworks and not a question as to what framework to use.

    Seriously you've misconstrued the question and moulded it into something else and even tried to correct others into seeing the question as to how you've read it.

    If this is the attitude you've taken to, then you need to adjust. Because how you've gone about things here is sad and surprising. I didn't expect anyone to be so daft, narrow minded and so eager to put others down in a technical community forum.

    ...
    Last edited by melancholic; May 28, 2006 at 20:31.

  23. #23
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hisham777
    thank you all for the information.

    conclution

    -i shall start reading about OO in brife
    -read about UML style of design
    -read and practice about OO PHP (class Public, privet...etc)
    -start with a basic project. design and code it using OO
    -start using a basic Framework Like CodeIgniter
    -then move to pattern (or may be you suggest start learn design bettern earlyer)
    -then am set i guess

    again thank you all
    Make sure you touch the book PHP 5 Objects Patterns and Practice
    along with sitepoints very own Jason Sweat's catalogue of patterns - PHP|Architect's guide to PHP Design Patterns

  24. #24
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't expect anyone to be so daft, narrow minded and so eager to put others down in a technical community forum.
    Neither did I.

  25. #25
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Keep this thread on technical discussions only please.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •