Archive for the ‘web development’ Category

Pulling Channel Partners into the Cloud

November 3rd, 2010

Many providers of cloud-based enterprise applications are finally able to answer the perpetual criticism that the software-as-a-service (SaaS) model does not support robust customization. Cloud-based development environments such as Salesforce.com’s Force.com and NetSuite’s SuiteCloud have matured significantly, offering things like scripting languages, user interfaces, and support for mobility. It’s reasonable to expect that these cloud-based development environments can now be used not only to customize SaaS applications but also to deliver significant extensions focused on manufacturing and other industries.

The question now is: Who’s going to develop cloud-based application extensions and customizations that support complex manufacturing-specific processes, such as product configuration, change order management, or even production scheduling?

Probably not manufacturers themselves. Manufacturers have spent the past 20 years or so dealing with the cost and hassle of customizing ERP applications and supporting those customizations. Today, most simply want to buy vertical-specific functionality off the shelf. And for the most part, vendors of on-premise ERP applications, such as SAP, Oracle, IFS, Infor, CDC Software, can accommodate them.

Nor are the SaaS application providers themselves likely to take on the task of delivering extensions required by manufacturers. SaaS vendors such as Salesforce.com and NetSuite, with their low cost-of-entry subscription pricing, are focused on mass markets. At a press event this week, NetSuite CEO Zach Nelson said his company wants to sell to the “Fortune 5 Million.” To do that, SaaS vendors must deliver broad solutions suitable for the mass market. They can’t spend time and resources digging into deep industry-specific functionality.

So, who does that leave? It leaves channel partners like resellers, independent software vendors, and system integrators. If multi-tenant SaaS applications are ever going to support complex manufacturing-centric processes, it’s the channel that’s going to deliver that support.

The problem is that resellers, system integrators, and other channel players typically haven’t been that interested in developing cloud-based solutions or creating practices around specific SaaS platforms. That’s because they can still make more money in the on-premise world, where remuneration comes mostly up front and isn’t spread out over years.

Now, however, there are signs that SaaS application vendors are reaching out to potential channel partners in a serious way. At its SuiteCloud 2010 event last week, NetSuite upgraded its development environment, making it easier for channel partners to control and distribute version changes of their software and execute phased rollouts.

That followed a move earlier this year by NetSuite to sweeten the deal for channel resellers by offering them 100% of subscription revenue for the first year when signing up new customers.

NetSuite’s efforts seem to be paying off. The company said Wipro will launch a practice around NetSuite, becoming the first significant system integrator to do so.

And NetSuite has attracted at least two manufacturing-focused ISVs: Rootstock Software, which claims to have six customers for its MRP application, developed on the SuiteCloud platform; and Iron Solutions, the maker of a cloud-based e-commerce solution for heavy equipment manufacturers.

This, to be sure, is a small beginning. But it’s good news for manufacturers who one day would like to see cloud-based applications deliver more than just sales force automation and accounting.

You can find the original post here : http://blog.managingautomation.com/channel/2010/04/pulling-channel-partners-into-the-cloud/

WordPress MU for Joomla! from corePHP

November 2nd, 2010

Continuing with our movement to truly collaborate with as many Joomla developers as possible, we were sent a test copy of corePHP’s WordPress MU for Joomla! For the unacquainted, this is a full version of WordPress INSIDE Joomla! for those who want the best blog software inside the most versatile CMS.


Installation
I tested on a local MAMP install and the install process was timing out, so I checked the filesize – 2.5mb :)  That’ll do it. This makes sense, since the component contains WordPress (duh). So I just unpacked in the tmp directory and installed from a directory and bam, the install worked in a snap.

At the end of the installed, you’re instructed to move a couple of key files for WordPress to work properly. I wish there was a link, but that’s just because I’m lazy. I like that it wasn’t automated, because I like to know when files are being moved into these particular directories.

I think clicked the link to Start Blogging, and pow, I’m in the WordPress admin. I fully expected this, but it’s still crazy at first. As a side note and time for a plug, using our AdminPraise2 Joomla! admin template with the WordPress inspired theme would really provide a seamless admin experience.

First Impressions
I clicked the link to preview my blog, and was taken to my Joomla! site, with a fully functional, fully integrated WordPress blog, and I’m severely impressed. I created a Joomla! menu item, where you can enter the ID of which blog you’d like displayed (since you can have multiple in WordPress MU), and there’s my site’s blog!

You can quickly add a new blog for a new user, as the Joomla! users are synced with WordPress.


Additional Extensions
corePHP gives you an entire slew of modules including tags, latest, and several others. They also included every native WordPress plugin you could possibly need. Lastly, they’ve included JomSocial plugins that will give your community the ability to have their own WordPress powered blog, sweet! I didn’t get to test the JomSocial plugins, but I’m sure it shows latest blog activity on the users’ JomSocial profile, and adds blog activity into the JomSocial activity stream.


Issues
I can’t give a perfect review of anything, it’s just not genuine (or in my nature). The only conflict I found was that the frontend layout for WordPress MU for Joomla! shares some common IDs used in Joomla! templates, such as “content” and “navigation”. These are commonly used in any layout from any CMS, so I’m sure they’re included as they would be in any WordPress layout, but to work well inside Joomla! they’d need names like “wp-content” and “wp-navigation”. This would take 2 seconds for the end user to fix, so it’s certainly not a show-stopper, but I could see a customer getting stumped and possibly confused for a moment.SuperBlog
With about 5 minutes of CSS love, I was able to get WordPress MU by corePHP working with our SuperBlog template. Not bad if I do say so myself.

Pricing
$79.95 for Single Blog, $99.95 for MU (as tested), $420.95 for 6 Site License


Rating

  • Best blog software inside the best CMS
  • Superb integration (frontend and backend)
  • All the extensions you’ll need
  • Price point may be high for some
  • Possible (tiny) template conflicts

Update – New WordPress MU Quick Icons Admin Module!
We enjoyed our testing so much, we’ve gone ahead and created a new WP Icons admin module, with quicklinks to all the pages in the WordPress admin. Just like the AP Icons in AdminPraise2, it contains all the links with the ability to hide, or display to Manager & above, Administrator & above, or only Super Admins. Look for lots more of these types of modules from us soon!

Here’s a couple of screenshots of WP Icons in AdminPraise2 (WordPress theme) and the default admin template:

Top 10 Joomla SEO tips for Google

November 2nd, 2010

How to search engine optimize your Joomla website in 10 easy steps.

1. Keyword Use in Title Tag

and appear in the blue bar of your browser.The number one factor in ranking a page on search engines is the title tag. These are the words in the source of a page in

Choose the title of an article very carefully. Joomla will use the title of the article in the title tag (what appears in the blue bar). It will also be the text used in any insite links (see #5 and 6)

2. Anchor Text of Inbound Link

Anchor text is the text that appear underlined and in blue (unless it’s been styled) for a link from one webpage to another.

Try to get some inbound links to your article using the keywords you want to be ranked for. Two ways are to do this are through online press services such as PRweb.com or simply by networking.

3. Global Link Popularity of Site (PageRank)

How many pages are linking to your page is called link popularity, or in Google, PageRank.

The more sites link to you, the better. Joomla is a CMS that helps you add content quickly. Create one quality content page per day. Quality content is the most important factor to getting bound links. For a site that will perform well, you eventually need 200 odd pages of content. This is the important point. QUICK SEO IS DEAD. The only way to perform well in SEO now is to have a rich content site.

4. Age of Site

When was the domain of the site registered?

Nothing you can do about this, but there is evidence that suggests that how long you have your domain registered for makes a difference (spam sites are not registered for long). Go and extend your domain registration for a couple of years.

5. Link Popularity within the Site

This is the number of links to the page from inside your own domain.

Because of #2, it’s critical that you link to articles from within your site using the right anchor text. Make sure that you:

  • Use the linked titles setting
  • Make good used of the Most Read, Related Items and Latest News modules.
  • Have a sitemap component linked to right from your homepage

6. Topical Relevance of Inbound Links and Popularity of Linking Site

It’s important that you get quality inbound links. This means they have to be from a site that is topically related to your, and one that has a high PageRank.

  • It’s worth submitting once to directories (then forget about it).
  • Type “related:www.yoursite.com” into google and contact the top 20 returns for links.Link Popularity of Site in Topic Community
  • Make sure you have a blog on your site, and network with others in your topical community. Make sure you frequently link to other blogs in your topical community.

7. Keyword Use in Body Text

The keyword density of the phrase you are optimizing for in the content of the page. Still important, the German study from Sistrix identified some interesting results.

  • Targeted keywords in the first and last paragraphs. There is a simple trick here, write your quality content, and then use the tool of your choice to find the keyword density. THEN, take the top three words and add them to the meta keywords in the parameters part of the page (in Joomla admin). This is somewhat backwards for some maybe, it optimizes a page for what you actually wrote, rather than trying to write a page optimized for certain words (which I always find difficult).
  • Keywords in H2-H6 headline tags seem to have an influence on the rankings while keywords in H1 headline tags seem to be getting less valuable. Modify the output of the core content component through a template override file.
  • Using keywords in bold or strong tags – slight effect, same with img alt tags and filenames.

Additional notes:

A couple of other factors at the bottom of measured/estimated influence.

8. File Size

The file size doesn’t seem to influence the ranking of a web page on Google although smaller sites tend to have slightly higher rankings. Optimize those images!

9. Clean URL (Joomla SEF)

Although Keywords in the file name (URL) don’t seem to have a positive effect (based on the German study), a URL with few parameters (?id=123, etc.) is important. Turn on Joomla SEF but don‘t get anal about it.

Other Notes

10. Utilize Your Error Pages.

Too often companies forget about error pages (such as 404 errors). Error pages should always re-direct “lost” users to valuable, text-based pages. Placing text links to major site pages is an excellent practice. Visit www.cnet.com/error for an example of a well-utilized error page. To make the error page fit with the rest of the theme of your site, create an uncategorized article and then copy the source as viewed on a webpage, and put that into the 404 file.

You can find original post here : http://www.compassdesigns.net/joomla-blog/top-10-joomla-seo-tips-for-google

Controlling Joomla! templates depending on menu you use

October 27th, 2010

We have been working on building a multi-school Joomla! website and there have been many hurdles to overcome since Joomla! isn’t a multi-site CMS. After searching for anything that’s common across each school, I realized the menu for each school could be used as a common denominator. If I could set a variable depending on which menu is loaded on the page then I can do just about anything I want, such as change the logo, set a unique CSS class, etc. After meeting with our developers we figured out how to do this and I’ll share it with all of you in case you ever need to do the same.

To start we need to pull in the information of which menus are being used on the page. Place this code in the head of your template:

jimport(‘joomla.application.menu’);
$menus = JSite::getMenu();
$m = $menus->getActive();

This checks for the active menus on the page and sets it into the variable $m so we can manipulate it. Next, you need to look at the menutype in the administrator Menu Manager (under Type). This is what we will use to determine which school is being viewed. I want to take this information and set a new variable named $school:

if($m->menutype == ‘district-information’) { $school = ‘district-info’; }
if($m->menutype == ‘cityname-elementary-school’) { $school = ‘cityname-elementary’; }
if($m->menutype == ‘cityname-middle-school’) { $school = ‘cityname-middle’; }
if($m->menutype == ‘cityname-high-school’) { $school = ‘cityname-high’;
}

The first thing I did was echo the variable $school into an ID on the body tag.

body id=”< ?php echo $school; ?>”

This allows me to style the CSS uniquely according to the school being viewed which gives you a lot of style control. To change the logo I can just call it by the school.

#cityname-high .logo {background: url(../images/logo-highschool.jpg);}

Another thing I did was load a unique module position according to the school so I could publish modules in all pages the menu shows up on. I did this by doing the following:

if($school == ‘district-info’) {
echo ”;
};
if($school == ‘cityname-elementary’) {
echo ”;
};
if($school == ‘cityname-middle’) {
echo ”;
};
if($school == ‘cityname-high’) {
echo ”;
};

As you can see this can give you the ability to do things you may not have been able to do before in Joomla!. I know it saved me from a major headache!

You can find original post here : http://www.corephp.com/blog/controlling-joomla-templates-depending-on-the-menu-you-use/

Configuring a mobile Drupal site and making your theme mobile friendly

October 27th, 2010

In this tutorial I’ll explain how to setup your Drupal site to be mobile friendly. Before you begin, it’s helpful to consider the following: 1) which mobile devices to support; 2) using a different theme for mobile; 3) which hostnames will be used; 4) multi-site configuration options; and 5) any site alterations to simplify the mobile experience.

For my site, I decided on the following:
1) iPhones (to start)
2) Use a more clean theme for my mobile site: DevSeed’s Singular
3) redirect mobile traffic to a new subdomain (mobile.thedrupalblog.com)
4) I was using sites/default for my blog, so hosting another hostname on the same filesystem was not an issue
5) I decided to remove some items in my primary navigation, and add some jQuery (accordion effect) to collapse node content on my front page.

I added the new DNS for my subdomain to point to the same IP address of my main site. In a standard Apache vhosts configuration, you can add a ServerAlias directive to ensure the mobile hostname is handled by the main site’s vhost. For example:


ServerName thedrupalblog.com
ServerAlias mobile.thedrupalblog.com
DocumentRoot /var/www/vhosts/thedrupalblog.com/httpdocs

I installed and enabled the Singular theme in sites/all/theme/singular.

I added some mobile specific configurations in my settings.php file (sites/default/settings.php):

/**
* Mobile Theme Configuration
*/

// define mobile http host
define(‘MOBILE_HTTP_HOST’, ‘mobile.thedrupalblog.com’);

// define mobile theme
define(‘MOBILE_THEME’,’singular’);

// override custom theme for mobile site
if ($_SERVER['HTTP_HOST'] == MOBILE_HTTP_HOST) {
$GLOBALS['custom_theme'] = MOBILE_THEME;
}

// check for iPhone
$is_iphone = preg_match(‘/iphone/i’, $_SERVER['HTTP_USER_AGENT']);

// redirect to mobile theme
if ($is_iphone && $_SERVER['HTTP_HOST']!=MOBILE_HTTP_HOST) {
header(‘Location: http://’ . MOBILE_HTTP_HOST);
die;
}
?>

Now, if someone visits my site using an iPhone, the user would be redirected to my specified mobile address, AND a new mobile theme would be used!

In addition, I decided to make some alterations to my mobile theme to simplify the interface. I created a module and added a hook_preprocess_page() implementation:

function MYMODULE_preprocess_page(&$vars) {

// only process page variables if this is the mobile address
if ($_SERVER['HTTP_HOST'] != MOBILE_HTTP_HOST) {
return;
}

// define mobile javascript
/*
NOTE: this jQuery is very specific to my theme, and is just shown as an example.
I looked into using jquery_ui’s accordion library, but it would not work out of the box with the structure of my new mobile theme :(
In an ideal situation, all jQuery would be put in separate include files
*/
$js = “

// define node container
var node_container = ‘.front #page #content’;

// define function to collapse node content
function collapse_nodes() {
$(node_container + ‘ .node div’).hide();
}

// define function to add click event
function node_title_add_click() {
$(node_container + ‘ .node h2.node-title a’).click(function(){
collapse_nodes();
$(‘div’, $(this).parent().parent()).show();
return false;
});
}

$(document).ready(function(){

collapse_nodes();
node_title_add_click();

});
“;
drupal_add_js($js, ‘inline’);

// rebuild scripts variable
$vars['scripts'] = drupal_get_js();

// determine a list of hrefs to remove from primary navigation
$href_remove = array(
‘drupal’,
‘tagadelic/chunk/1′,
‘recent-posts’,
‘rss.xml’,
‘logout’,
‘contact’,
);

// loop through primary links and remove as necessary
if (is_array($vars['primary_links'])) {
foreach ($vars['primary_links'] as $key => $value) {
if (in_array(strtolower($value['href']), $href_remove)) {
unset($vars['primary_links'][$key]);
}
}
}

}
?>

By added the above module code and jQuery, I removed some items from my primary navigation and added an accordion-like interface for the front page:

NOTE: If you’re using a Mac, the iPhone Simulator application (which comes with Xcode + iPhone SDK) is a great way to development and test mobile configurations.

You can find original post here : http://thedrupalblog.com/

Virus Cleaning and Prevention in osCommerce

October 27th, 2010

What virus do?
In an osCommerce site a virus malware do the following:
- Create a form ask unnecessary to fill confidential data like order
detail or paypal detail. Once someone fills these details, those details
will be emailed to third party for misused.
- Creating link of website for creating traffic for those link.
- Using redirector for redirecting the customer to other site.
- Using iframe to display some unauthorized detail with a link to wesite.
So basically there are two objectives
- Steal data.
- Divert traffic to another website.

Different ways in which hackings are achieved.

1) SQL injection
2) Modify .htaccess and writing the error 404 rules or rewrite rules.
3) Place some javascript.
4) Placing .php or other files to execute and modify other files.

How to make out what is wrong?
Downloade all the code and check for,
- External links.
- javascript code having eval in it.
- check your .htaccess file.
- checking image folder and other folder.
- check permission is 777 or writing permission.
- use some scanning references to check for valueval pass and
analyze code.
- check your error log.
- check your access log.

Preventions:
Prevention basically includes three things.
• Your site itself
• Password of software used to upload content on site.
• And your Computer from where content is being upload.

How does one protect its site?
- Ensuring that all third party scripts or tools used on site should have
latest security updates or should be asked to hosting company to do
so.
- Delete unwanted folders, files, scripts and services those are no
more in use.
- Occasionally change the password of the software used to upload
content to the site.
Use strong password.
- Appropriate file permissions to be given.
- Disable file manager from admin.
- Site admin should be password (.htaccess) protected.
- Keep the computer used for site’s upload and download activities
should be up-to-date with all necessary operating system updates
and a strong antivirus with all latest updates.

Recommendations:

- It is always recommended, not to keep a soft copy of site
access details on computer.
- A regular code and database backup should be taken.
- There is few security add-ons are available in osCommerce that
should be installed on the site.

You can find original post here : http://www.oscprofessionals.com/blog/

iPhone application development and outsourcing

October 27th, 2010

The complete potential of iPhone, the multimedia gadget, can be utilized by developing ingenious applications for it. The launch of the SDK (software development kit) by Apple in 2008 boosted iPhone application developer worldwide to come up with unique and customized applications for iPhone users.

The SDK, also known as the ‘tool chain’ includes:

Xcode: It is the integrated development environment (IDE), wherein iPhone applications are developed. It is the integral part of the iPhone application development kit and consists of a graphical debugger and a powerful source editor too. Interface builder: It helps in the designing and testing of user interfaces. The graphical editing environment of the interface builder is utilized by the iPhone application developer to design user interfaces and seamlessly integrate the applications to the 3G environment of iPhone. Instruments: The instrument retrieves data, analyzes and compares performance and displays the results graphically in real-time. It plays a pivotal role in the real-time optimization of iPhone applications.

An iPhone application developer should have a sound knowledge about using the SDK. The SDK uses the objective C language and runs only on the MAC OS X 1.5 platform (the OS of iPhone). The applications developed needs to be approved by Apple and can be distributed solely through App Store.

iPhone website development

There are various categories catering to which, iPhone applications are developed. Many companies specialize in a particular category. For example, a company may specialize in the domain of iPhone website development. An iPhone mobile development domain includes useful web 2.0 applications designed exclusively for iPhone, like:

Search tools. Web utilities. Social networking. Ecommerce websites. Travel, sports and entertainment and so on.

Outsourcing of iPhone application development

Outsource of iPhone application development has several advantages which mainly includes:

Firstly, it is cost effective. Outsourcing of IPhone applications gets the job done in lower costs. Customized applications can be developed without much investment which was otherwise necessary for the technical manpower and training. The rigmaroles of the iPhone applications- approval by Apple, guidelines etc are taken care by the companies.

iPhone Cool Projects

41gNRqHs6qL. SL160 iPhone application development and outsourcing

I am the webmaster at www.synapse.co.in – a iPhone website development company in India offering numerous services, such as flash web development, flash scripting, customized applications for the iPhone,and website maintenance services

ISBN13: 9781430223573
Condition: USED – Very Good

Notes: BUY WITH CONFIDENCE, Over one million books sold! 98% Positive feedback. Compare our books, prices and service to the competition. 100% Satisfaction Guaranteed

The iPhone and iPod touch have provided all software developers with a level playing field—developers working alone have the same access to consumers as multinational software publishers. Very cool indeed! To make your application stand out from the crowd, though, it has to have that something extra. You must learn the skills to take your apps from being App Store filler to download chart-topping blockbusters.

Developers with years of experience helped write this book. Spend some time understanding their code and why they took the approach they did. You will find the writing, illustrations, code, and sample applications second to none. No matter what type of application you are writing, you will find something in this book to help you make your app that little bit cooler.

The book opens with Wolfgang Ante, the developer behind the Frenzic puzzle game, showing how timers, animation, and intelligence are used to make game play engaging. It moves on to Rogue Amoeba’s Mike Ash explaining how to design a network protocol using UDP, and demonstrating its use in a peer-to-peer application—a topic not normally for the faint of heart, but explained here in a way that makes sense to mere mortals. Gary Bennett then covers the important task of multithreading. Multithreading can be used to keep the user interface responsive while working on other tasks in the background. Gary demonstrates how to do this and highlights traps to avoid along the way.

Next up, Canis Lupus (aka Matthew Rosenfeld) describes the development of the Keynote-controlling application Stage Hand, how the user interface has evolved, and the lessons he has learned from that experience. Benjamin Jackson then introduces two open source libraries: cocos2d, for 2D gaming; and Chipmunk, for rigid body physics (think “collisions”). He describes the development of Arcade Hockey, an air hockey game, and explains some of the code used for this.

Neil Mix of Pandora Radio reveals the science behind processing streaming audio. How do you debug what you can’t see? Neil guides you through the toughest challenges, sharing his experience of what works and what to watch out for when working with audio. Finally, Steven Peterson demonstrates a comprehensive integration of iPhone technologies. He weaves Core Location, networking, XML, XPath, and SQLite into a solid and very useful application.

Software development can be hard work. Introductory books lay the foundation, but it can be challenging to understand where to go next. This book shows some of the pieces that can be brought together to make complete, cool applications.

You can find original post here : http://www.theoutsourceblog.com/2010/08/iphone-application-development-and-outsourcing/

Setting up a symfony project with PHPUnit on Hudson

October 26th, 2010

We are using Hudson now for several months as Continous Integration System. This short article describes how we have configured a hudson project for a symfony 1.4 project. I am assuming that the reader is already used to Hudson and knows how a normal project has to be configured.

PHPUnit is the test framework of our choice (surprise, surprise) and we are using the sfPHPUnit2Plugin for all our projects. If you do not now this plugin you may first read another post where the usage and features are described in detail.

All requirements in short:

* Hudson has to be installed
* Hudson plugin xUnit Plugin has to be installed
* the symfony project needs the sfPHPUnit2Plugin
* PHPUnit has to be installed on your test server

Ok, here the configuration steps of the hudson project:

1. Configure your project

Configure standard settings for a hudson project like source-code management settings or email notifications. Please check the official docs if you do not know how to handle this.

2. Add a shell build step

Building a symfony project in a test environment is pretty easy. With the help of some shell commands the project is completely configured and ready for testing. Those shell commands may be entered in the build step section of the hudson project. Defining the correct commands is the main part during the configuration process.

Our configuration looks like this:

1. cd $WORKSPACE/trunk
2. sh _deployment/install_test.sh
3. php symfony cc
4. php symfony phpunit:test-all –configuration –options=”–log-
5. junit=build/testresult_$BUILD_NUMBER.xml” cd build
6. ln -s -f testresult_$BUILD_NUMBER.xml currentTestResult.xml

1. Jump in the project root of the project
2. Install the project on the test server with the help of a internal shell script. This step includes for example the generation of the databases.yml.
3. Clear the symfony cache (always a good choice)
4. Run all PHPUnit tests including unit and functional tests. The test result is written in a jUnit compatible logfile (needed for the xUnit Plugin).
5. Jump in the build directory, which is internally used by Hudson
6. Symlink the latest testresult

3. Configure Post-Build-Action

After the xUnit Plugin is installed correctly, an additional PHPUnit Pattern field should be displayed in the post build action section. In this field has to be entered:

1 trunk/build/currentTestResult.xml

The options “Fail the build if test results were not updated this run” and “Delete temporary JUnit file” should be both checked.

The xUnit Plugin takes the currentTestResult.xml file, which was previously created with the help of the sfPHPUnit2Plugin and analyzes it. When everything works fine, you should be able to review the created test reports.

Here some screenshots how this result could look like.

Build history:

Trend graph of the test results:

You can find the original post here : http://dev.esl.eu/blog/category/symfony/

A new perspective on the future development of Joomla!

October 26th, 2010

There have been endless discussions around how Joomla! is developed and maintained. One thing is clear though: development is quite slow and new significant features for the end user have not yet been introduced since the Mambo days… It’s one of the reasons we decided to build K2, so we could introduce more modern and popular features into Joomla! now.

But how could the development of Joomla! not be slow? Given that the core team are human beings and not robots that work 24 hours a day on coding and debugging Joomla!, it’s really simple to realize why the development process is slow. Additionally, it is not easy to contribute code to Joomla! because there are certain protocols need to be followed that make the entire process even slower.

Obviously this is not a post to bash the core team but a new thought on how we could possibly see Joomla! being development in the not so distant future.
So how could we speedup Joomla! development?

It’s really simple. Joomla! is modular by nature. So why not make development modular as well?

Here’s a realistic example: Joomla! is made up of components like com_content (for articles), com_menus (for the menu management system), com_polls (for the polls) and so on. The Joomla! team could easily “contract” some professional developers and have them undertake the development of a specific component or perhaps module or plugin or whatever!

Imagine this: Joomla! 1.6 will be released without comments (despite original claims for the opposite). How difficult would it be for some developers to create a comments component, contribute it to the default Joomla! 1.6 distribution and also be responsible for maintaining the code!

One thing is for sure. A lot of weight would be lifted off the core team and significantly boost Joomla!’s development. If a bug is introduced on the above example of the comments component, the developers of that component could issue an upgrade and deliver the upgrade through joomla.org to all Joomla! users. Why update an entire Joomla! website when there is a specific problem in some component?

It’s how things work in bigger software deployments like operating systems (OS). Teams and sub-teams developing and maintaining individual applications that make up the end product. The best example I guess is from the Linux world where there are applications developed for certain Linux distributions – the bond is so strong that you think they are actually part of the OS (see Ubuntu).

To conclude, I don’t think it will be hard for the Joomla! core team to find such developers to code and maintain specific elements of Joomla!. If others can do this in projects with a gazillion lines of code, then Joomla! can do it too.

We (as JoomlaWorks) have offered to code (yes, code, not debug) many times and I know a lot more people who have expressed the same interest as well. And I know it’s difficult for the core team to just give away SVN access to others. I wouldn’t easily trust other devs to code on K2! But I would certainly trust someone to develop and maintain a module of K2 and have it included in the default distribution.

The only hard part is for the Joomla! core team to actually approve that some developer can deliver quality code by some standards, but it’s really no biggie. We are a large community and there’s a lot of talent to jump in and help things out. Can you imagine what a positive impact this would have to Joomla!’s PR and especially to users of other content management systems?

What do you think?

You can find the original post here : http://blog.joomlaworks.gr/a-new-perspective-on-the-future-development-o

Symfony Tutorials: Using sfValidatorCallback

October 26th, 2010

Many times when you’re validating forms in symfony you need to do more than what the standard validators allow, and since you’re lazy you don’t feel like creating your own custom validator. sfValidatorCallback to the rescue!

sfValidatorCallback allows you to define your own validation function to be used for a given form field. It also allows you to scrub the data in any way you see fit. We’ll look at both uses.
A Psudo-example

Since you can use the callback validator for literally anything you want, here’s a simple example of how to use a function in your model to validate a field on the form for that model object

In MyObjectForm.class.php:

1.public function configure() {
2. …
3. $this->widgetSchema['some_text_field'] =
4. new sfWidgetFormTextArea(array(‘required’=>false));
5.
6. $this->validatorSchema['some_text_field'] = new sfValidatorCallback(
7. array(‘callback’=>
8. array($this->getObject(), ’someTextFieldValidatorHook’)
9. )
10. );
11. …
12. }

Here we see that we’re setting the validator for some_text_field to our call back. The first parameter to the callback takes our options. For these we need to pass a callback, which takes the same parameters as PHP’s call_user_func. Since we want to call a method in our base model object, we’ll use an array as the first parameter to pass our object and the method we want to call. $this->getObject(); returns the model object of the form, and someTextFieldValidatorHook is what we want to call.

So, in MyObject.php, in your model folder:

1. public function someTextFieldValidatorhook($validator, $value) {
2.
3. //test $value, set $pass if its ok
4.
5. if($pass) {
6. return $value;
7. }
8.
9. else {
10.
11. $message = “I can write whatever I want here based on the results “.
12. “of my test. The point is that this field didn’t validate though”;
13.
14. throw new sfValidatorError($validator, $message);
15.
16. }
17.
18. }

We can see here that the magic is throwing the exception when your test fails. The exception bubbles up and is caught by the form stuff on a higher level to render the error message to the user as you would expect.

Now, there are are a few things to keep in mind:

* sfValidatorError can take a message code and error messages as its second and third parameters. However, most of the time you use the call back, you’ll want to generate the error message internally, since its dependant on the test you just wrote. Still, remember that you can respond with canned error messages if you want.
* Your data hasn’t been saved yet, so you really have no notion of what the other fields are unless you grab the request object and look at them.
* You can make your validation method static if you want, but sometimes its helpful to have the old values of your current object, or you may have expanded your model object to do things beyond the standard get/set stuff.

Is This Cool?

Some may argue that this kind of validation doesn’t belong in your model object, and a separate validator object should be created. I can see that point, and I think I mostly agree with it, but there are exceptions to every rule. Sometimes this simple approach is the correct one, and it can streamline your development.

Still, you should keep in mind that your validation function is going to throw a validator exception, so indicate that you’ll need to catch it in your documentation if the test fails, or name the method something to show that it should only be used as a hook to the validator, as I’ve done with someTextFieldValidatorHook.
Scrubbing

One last benefit of the validator is that it gives you a good way to scrub your data before you save it. Since your callback function (someTextFieldValidatorHook in our case) takes the value in to verify it and returns it at the end if the test passed, you can technically change it to whatever you want. Some possible ideas are:

1. Removing HTML
2. Converting text links to actual links (bad example as you should probably do this on output)
3. Formatting Phone Numbers
4. Etc, etc

That’s It

Hope you found this useful. Feel free to share how you’ve used the callback validator in your applications.

You can find the original post here : http://www.pbtg.com/blogs/jim/tag/symfony