WEBO Site InSight - Combining CMS

    WEBO Site InSight% username, good day / night / morning / what else happens :) I’m in a hurry to inform you of insanely cool news: now the development of extensions immediately for many CMS has become much easier. If in Russian, then the extension for Joomla! can now be installed on WordPress, Bitrix, Drupal, or what-else-you-on-site-is used. And vice versa.

    But it's too cool to be true, right? :) Details under the cut.

    Then there are a lot of letters, but you can download this miracle extension right here (the size is about 100 Kb). In addition to the platform itself, it includes 4 widgets for measuring client and server download speeds, memory consumption and free disk space. The extension is available only for Joomla! and WordPress ( system requirements ).

    Introduction


    It all started back this spring at the RIF, where the idea came up to create a CMS-independent platform for web development to easily export-import extensions, and significantly increase the number of high-quality plug-ins for CMS (due to the reuse of high-quality code). The project Katmandoo (the finalist of another competition - Russian Startup Challenge ) was supposed to provide all this , but its implementation was postponed until better times.

    In order to prevent the chasm of such a wonderful idea, our team gathered a little strength and implemented (so far only a small) part of the laid-down functionality. It became a common API for working with a database and the most used functionality of systems, on the basis of which it is very easy to create fairly complex extensions. The platform that implements all this is called WEBO Site InSight .

    WEBO Site InSight


    What is there now? At the moment, it is rather an alpha version of the product, which allows you to implement some arbitrary ( limited by the existing API ) functionality for all supported systems. These systems are also not very many - there are only two WordPress and Joomla !, so far, but covering 5-7 more popular works is not difficult, because there is a lot of experience working out for them.

    The product consists of several API levels: a system API for use inside the extension itself, a wrapper API to the database in CMS and an API for connecting to the most standard CMS events (onStart / onBeforeEnd / etc). The API is not rich, but now it allows you to collect and display quite interesting data about the system under study. In particular, processor time consumption and client download speed.

    Yes, all extensions (widgets) for WEBO Site InSight are written uniformly for all systems (that is, now in fact for Joomla! And WordPress there is no difference in the code of the widgets themselves), the API is described a little in the Wiki here and here , we will We will expand and supplement the documentation. So far, this is all in working alpha mode.

    Plugin example


    In order not to poison the soul, I immediately give an example of a code that provides the full functionality of a small widget. The widget displays the amount of memory consumed when creating a site page.
    <? php
    class SiteInSightWidgetRAMUsage {
    	var $ friendlyName = 'RAM Usage';
    	var $ group = 1;
    	function SiteInSightWidgetRAMUsage () {}
    	function onActivate ($ WSI) {
    		return array (
    			'dataStructure' => array (
    				'ram' => array (
    					'type' => 'int',
    					'key' => true
    				)
    			)
    		);
    	}
    	function onView ($ WSI) {
    		$ data = $ WSI-> getWidgetData ();
    		$ average = 0;
    		$ total = 0;
    		foreach ($ data as $ k => $ v) {
    			$ average + = $ v ['ram'];
    			$ total ++;
    		}
    		$ average / = ($ total? $ total: 1);
    		$ average = round (100 * $ average / 1024/1024) / 100. 'Mb';
    		return array ('short' => $ average, 'detailed' => $ average);
    	}
    	function onBeforeEnd ($ WSI, $ content) {
    		$ WSI-> storeWidgetData (array ('ram' => @memory_get_usage ()));
    		return $ content;
    	}
    }

    What the widget does: when activated (onActivate) creates a table in the database to collect values. Further, before the end of the page processing (onBeforeEnd) records the current memory consumption. The administrator interface (onView) displays the collected data (so far as an average value of memory consumption per day).

    The essence of the widget is simple, but the code is insanely small. For more complex examples, an API extension is most likely required, but for now, the main function of WEBO Site InSight is to collect static information about the current site.

    Ideology


    As already stated just above, arbitrary functions are not yet cross-platform supported. And such a goal was not set. We created only an analytical tool for researching site performance / quality. Which could be as easy as possible to transfer from site to site. And which would be free .

    Yes, the main idea is free software. All platform code and current widgets are released under the GPLv3 license, i.e. it can be used, practically, everywhere (at least, on already supported WordPress and Joomla!). No restrictions and the use of the platform is not imposed (and will not be imposed).

    Interface


    We, apparently, have been discussing the platform concept itself and the future interface for too long, which in the end could not come to a final opinion. Now a small part of the functionality has been implemented (in particular, there are no detailed graphs for the statistics collected, we will add this first of all), but it all looks quite neat.

    Appearance of the product after installation (4 current widgets with the ability to activate them, widgets are automatically installed from the product folder)


    Appearance of the product with all widgets installed (there is not much information, but much more data is being collected now, and it’s only a matter of deducing it) .


    Also right now, you can collapse all widgets in one block into just a status line (done for the future, when there can be a large number of widgets and grouping blocks).


    Plans and suggestions


    Now we are planning
    1. add support for all the systems we know (Drupal 6, Bitrix, NetCat, CS-Cart, Magento) with the same functionality,
    2. add the output of graphs / additional information, based on Raphaёl, everything will be something like this
    3. add settings for widgets (so that you can collect any specific data or set access details for a third-party API, for example).
    4. add a widget installation mechanism (for now only copy folders manually, or add to the assembly),
    5. localization, and another 1000+ other features.

    The product is fully Open Source (GPLv3, and even if it changes, it’s only in the field of OSI-compatible), so we invite everyone to openly test and create widgets based on the platform, and to refine the platform itself and expand it to less popular CMS (but which you maybe use every day). Both server (for the platform core) and client (for the interface) programmers are needed.

    Yes, of course, your opinion and feedback from the community of web developers is very important to us.

    Link to the project on Google Code: code.google.com/p/webo-site-insight
    Documentation there: code.google.com/p/webo-site-insight/w/list
    Download code.google.com/p/webo -site-insight / downloads / list
    Including widget APIcode.google.com/p/webo-site-insight/wiki/WEBOSiteInSightAPI
    API for the database code.google.com/p/webo-site-insight/wiki/WEBOSiteInSightDBAPI

    Also popular now: