Results 1 to 3 of 3

Thread: Introducing an API-focused WWW PHP micro-framework

  1. #1
    Join Date
    Feb 2012

    Lightbulb Introducing an API-focused WWW PHP micro-framework

    I've never felt comfortable working with various huge frameworks out there. I gave Zend a shot for about six months and since then have been mostly using Kohana. But personally I still find myself preferring the approach of 'micro-frameworks' (article here) that do a specific task and for everything else leave the things in developer hands. This means no bloated libraries and no heavy footprint.

    As such I've been developing, writing and rewriting and refactoring a small framework that I've mystically named 'WWW Framework' for the better part of last six months.

    It is open source (LGPL) and available at SourceForge: WWW Framework.

    WWW is a PHP micro-framework that is built loosely on model-view-control architecture and factory method design pattern. It is made for web services, websites and info-systems and is built around a native API architecture, caching and smart resource management. WWW is a compact framework that does not include libraries and bloated features and is developed keeping lightweight speed and optimizations in mind.

    WWW comes by default with a view controller and a gateway intended for website functionality with clean URLs and it also incorporates a front-end JavaScript controller.

    Documentation about use
    A simple tutorial

    Mercurial repository is available for developers who are interested in following the development.

    It's still quite new and I intend to frequently post more tutorials and updates for the framework. I am sharing it here since some of you just might be interested if you are a likeminded developer and find this exactly to be what you've been looking for

  2. #2
    Join Date
    Feb 2012
    Those of you who downloaded 1.0.3 version of the framework, it had a bug in the code (and totally my fault!). You should grab 1.0.4 which is the latest now here.

  3. #3
    Join Date
    Feb 2012
    Just wanted to let you know that the system has been improved quite a bit since the original release.

    I am still working on a tutorial about how to build a simple website though. There is a tutorial about how to build a simple web service and other detailed documentation, but I hope to finish the website tutorial soon!

    There's not a lot to show 'visually', but I did add some interesting features such as dynamically loading images.

    Basically any file in environment controlled by WWW Framework is loaded through an image handler which accepts various 'parameters'. So instead of PHP script type of solutions, the result is far more elegant.

    For example, if you have this image on the server:

    You can adjust this image based on filters set to it through its filename:
    Cropped into new resolution
    Cropped and fitted into new resolution
    Fitted with background
    Fitted with background and background color
    The same as above, but with 30% quality
    Same as above but with worst quality

    It's also possible to use image filters for color adjustments:
    This uses sepia-toned filtering
    This uses grayscaled image with horrible quality

    And of course you can change these parameters around as you see fit.

    There is only one real file stored in filesystem (/resources/chesspawns.jpg), but every request is cached separately. This can be used to dynamically load avatar pictures and other type of pictures without having to worry about design changes later on and if these design changes 'break' things. Nothing has to be 'regenerated' for that purpose. Server only stores what is needed and is as optimized about it as possible.

    List of all newly added features is here:

    • New returned data types with additional processing, like ‘ini’ and ‘rss’ files
    • New configuration option for resource cache durations, dynamic resource loadings and limiters
    • Can now use deflate as an output compression type, together with Gzip
    • New Cleaner developer script for cleaning WWW created caches and temporary system files
    • Better support for clients that send no request headers
    • System now maintains image files as well and this includes support to dynamically resize and crop images per request
    • It is now possible to dynamically unify CSS and Javascript files
    • Simple minification can be used for CSS, Javascript, HTML and XML files
    • JS and CSS file compressions are now cached, increasing performance
    • It is also now possible to use image overrides from resources subfolder
    • Limiter now affects all requests, including static file requests
    • Logger now is categorized and is also used for tracking static file requests
    • New compatibility script for testing server and PHP setup
    • Restructured Index gateway and added request-type handlers for each resource type
    • Minifier class added and functionality implemented in both Resouce handler as well as for API requests
    • File paths and resource loading much improved
    • Limiter and Logger have now a more streamlined internal process
    • Index gateway now also supports IP based blacklists
    • Much better URL Map functionality which allows to set whether unsolved URL’s are allowed or not
    • Default View controller now uses unified resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.10821 seconds
  • Memory Usage 2,869KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (3)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (71):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates