Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

What does framework mean?

Options
  • 26-07-2009 8:05pm
    #1
    Registered Users Posts: 1,583 ✭✭✭


    Can somebody explain to me simply what a framework is?
    I hear about AJAX frameworks all the time. I know what AJAX is but what does a framework mean/do?


Comments

  • Registered Users Posts: 1,181 ✭✭✭ronkmonster


    They are libraries of code that someone else writes to aid in your own development. They are usually generic but some can be very specific to a goal.

    Spring or hibernate would be two examples of frameworks.
    They are available for java and now C# (dotnet)

    Hibernate lets you put a abstract layer between your code and the database so you can change underlying database without writing your code.

    You could write your code in a way that lets you do this yourself but this existing library makes it easier.


  • Moderators, Politics Moderators Posts: 39,846 Mod ✭✭✭✭Seth Brundle




  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    I prefer writing things from scratch; that way I can be sure the code will be clean and simple. Frameworks just add an extra layer of complication, IMO.


  • Closed Accounts Posts: 580 ✭✭✭karlr42


    AARRRGH wrote: »
    I prefer writing things from scratch; that way I can be sure the code will be clean and simple. Frameworks just add an extra layer of complication, IMO.
    Cool, next time you want to use a vector or a dictionary or a hash-table or an XML parser or string functions, write them yourself in a nice clean, simple way- let me know how that turns out.


  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    karlr42 wrote: »
    Cool, next time you want to use a vector or a dictionary or a hash-table or an XML parser or string functions, write them yourself in a nice clean, simple way- let me know how that turns out.

    I am not talking about core functions - I am talking about frameworks like elgg.

    BTW I wrote an XML parser about 8 years ago - it's hardly complex programming.


  • Advertisement
  • Registered Users Posts: 197 ✭✭pauldiv


    Another popular framework is YUI for CSS and Javascript

    It looks good but the code looks bloated and the naming conventions are pretty strange. This is not helpful when you are putting together the blocks that make up a web page and then later have to manage that code

    A framework is like a timber frame house in that it can get you started quickly but it is much better in the hands of a skilled bricklayer rather than a blocklayer

    There is no substitute for knowing how code works because that is where you acquire the real power to customise things. You also become more used to working with your own logic rather than someone else's

    Smart programmers will know about those frameworks / libraries that are useful to them and sometimes use them with code they have written themselves


  • Registered Users Posts: 1,583 ✭✭✭alan4cult


    So is there really any difference between frameworks and libraries like the JAVA Api?


  • Moderators, Science, Health & Environment Moderators Posts: 10,079 Mod ✭✭✭✭marco_polo


    alan4cult wrote: »
    So is there really any difference between frameworks and libraries like the JAVA Api?

    I was going for a general explaination but the words were not coming out right at this hour so I will use an example. :D

    The JDBC API is an example of a java library it contains various helper classes for connecting to a database and performing basic queries against a database. Anything above this basic level of functionality you would have to code yourself (Load stuff into objects, update it etc).

    Hibernate on the otherhand is a framework. It allows you to define your data objects and map those objects and fields to underlying database tables. It also allows you to configure the relationships/associations between different objects which reflects the underlying database relationships. Most of the database related work, loading and updating of objects etc is done for you. As well it has features such as session management, transactions, fetching strategies, cascading deletes etc. It means you do not have to write hardly any SQL or plumbing code( making DB connections, load and save objects- that sort of stuff) whatsoever. (In my limited 3 years experience I have come across one custom in house OO - DB mapping 'solution' before - not pretty at all :))

    Also there are generally some basic rules laid down by a framework, often in the form of interfaces that certain object types must implement or naming conventions that methods must use.

    Hmm, still a bit crap but as good a I can do at the moment :)


  • Registered Users Posts: 197 ✭✭pauldiv


    alan4cult wrote: »
    So is there really any difference between frameworks and libraries like the JAVA Api?

    C# is basically a Java rip off and it is part of the ".net framework" but you don't often hear Java referred to as a framework. Library or API would be the term most often used

    If you think about the word framework and what it actually means then it becomes obvious that many people use it out of context. It's a vague and wimpy term that is not very helpful

    CodeIgniter is called a framework in that it's a skeleton on which to build web applications. In this case you can actually get a sense of something tangible and can see why the term 'framework' is the more appropriate term to use

    You can also use a Javascript library like JQuery in the CodeIgniter framework.


Advertisement