Pages

Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Sunday, September 27, 2009

New Simple Cloud Storage API Launched

PHP/Zend, Microsoft, IBM, Rackspace, GoGrid and Nirvanix have launched a new low level cloud API for PHP called the "Simple Cloud API http://www.simplecloud.org/".

The API can best be described as low level storage focused API (An API for other API's). In a sense it's a way to create other higher level programmatic API interfaces such as REST or SOAP using an easy, yet portable PHP programming environment. The Simple API allows you to easily interact with a variety of cloud interfaces including support for File Storage, Document Storage, and Simple Queue services. The Simple Cloud API is not a web service; it is an API that exposes common operations in application services offered by different vendors, making it easier for PHP developers to build ‘cloud native’ applications.

According to the website http://www.simplecloud.org/, "The Simple Cloud API is here to bring cloud technologies to PHP and the PHP philosophy to the cloud. With it, developers can start writing scalable and highly available applications that are still *portable*. If you're looking for code to start playing around with immediately, you'll find the first file storage, document storage, and simple queue interfaces."

Interestingly the goal of API is not be a standard, but instead to foster an open source community that makes it easier for developers to use cloud application services by abstracting insignificant API differences. Another goal of this initiative is to define interfaces to be implemented as a new Zend Framework http://framework.zend.com/ component called ‘Zend_Cloud’. The Zend Framework will provide a repository of php appplication to host code for the Zend_Cloud.

Check out the project at http://www.simplecloud.org
Reblog this post [with Zemanta]

Tuesday, August 4, 2009

Ajax and Mashup Security

Ajax and mashups represent two new Web application development approaches that both fit under the Web 2.0 umbrella.

Ajax

Asynchronous JavaScript + XML (Ajax) allows user interaction with Web pages to be decoupled from the Web browser's communication with the server. In particular, Ajax drives mashups, which integrate disparate content or services into a single user experience. However, Ajax and mashup technology introduce new types of threats because of their dynamic and multidomain nature. It is important to understand these threats and to avoid them by adhering to some best practices.

Mashups

A mashup is a web application that combines content from more than one source into an integrated experience. Usually, the mashup components interact with each other. In the classic example of a mashup, a Craigslist component is combined with a mapping component (e.g., Google or Yahoo maps) such that when a user clicks on a new Craigslist entry, the mapping component updates its view to show the new address.

Mashups typically allow the end user to discover and integrate third party, Ajax-powered mashup components onto the mashup's canvas. Examples in the consumer social networking space include Facebook Widgets and MySpace Widgets, which end users can discover and insert into their pages.

From a technology perspective, mashup components represent Ajax-powered "mini applications" that are assembled into an Ajax-powered mashup container application that provides a framework for the components to communicate with each other. Sometimes the mashup container application enables cross-site communications by providing proxy services to allow server-side redirection to Web servers that are associated with a given mashup component.

Here is a whitepaper from Open Ajax Alliance on Ajax and mashup security that you may wish to peruse.

Ajax and Mashup Security

Reblog this post [with Zemanta]


"Web Application Security — How to Minimize Prevalent Risk of Attacks"

Vulnerabilities in web applications are now the largest vector of enterprise security attacks.

Stories about exploits that compromise sensitive data frequently mention culprits such as "cross-site scripting," "SQL injection," and "buffer overflow." Vulnerabilities like these fall often outside the traditional expertise of network security managers.

To help you understand how to minimize these risks, Qualys provides this guide as a primer to web application security. The guide covers:

  • typical web application vulnerabilities
  • comparison of options for web application vulnerability detection
  • QualysGuard Web Application Scanning solution

Offered Free by: Qualys, Inc.

REQUEST NOW


Sunday, August 2, 2009

The Underground PHP and Oracle Manual

This free PDF book is for PHP programmers developing applications for Oracle Database. It bridges the gap between the many PHP and Oracle books available and shows how to use the PHP scripting language with Oracle Database. You may be starting out with PHP for your Oracle Database. You may be a PHP programmer wanting to learn Oracle. You may be unsure how to install PHP or Oracle. Or you may just want to know the latest best practices. This book gives you the fundamental building blocks needed to create high-performance PHP Oracle Web applications.

About the Authors

Christopher Jones works for Oracle on dynamic scripting languages with a strong focus on PHP. He is a lead maintainer of PHP's open source OCI8 extension and works closely with the PHP community. He also helps ensure that future versions of Oracle Database are compatible with PHP. He is the author of various technical articles on PHP and Oracle technology, and has presented at conferences including PHP|Tek, the International PHP Conference, the O'Reilly Open Source Convention, and ZendCon. He also helps present Oracle PHP tutorials and PHPFests worldwide.

Alison Holloway is a senior product manager at Oracle with a number of years experience in advanced technology. She has presented at various PHP conferences. Most recently she has been working with Oracle VM.

Click Here to download this PDF book (6.2MB)

Reblog this post [with Zemanta]

Loading image

Click anywhere to cancel

Image unavailable

Loading image

Click anywhere to cancel

Image unavailable

Wednesday, June 24, 2009

The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!

A compilation of the best solutions provided to common PHP questions.

The PHP Anthology will save you time, and eliminate the frustration of completing PHP tasks, with a comprehensive collection of ready-to-use solutions. If you're building web applications with PHP you'll never let this book out of your site!

Offered Free by: SitePoint

Get it here: SitePoint

Download sample chapters here.



Reblog this post [with Zemanta]

Tuesday, June 9, 2009

Free spell checkers in HTML Forms

A few days ago, some friends on toostep asked a question about doing a spell check in the postings and edit and do spell check in the comments. This post is in response to that question.

In this post I want to suggest you five interesting and free spell checkers for HTML Forms (input and text area) ready to use in your web projects. I also provided some suggestions regarding how to implement them on your pages using a few lines of HTML and Javascript code. Try them!

Any suggestion about this topic? Please leave a comment, thanks!

1. Spellify



Spellify is a script.aculo.us based spell checker, released by Nikola Kocic, for form fields that utilizes Google as its spell check engine. Spellify can also be configured to different languages (refer to spellify.js for more information regarding language settings) and requires:

- PHP 4+ with CURL library installed (developed using PHP 4.4.6)
- script.aculo.us 1.8.0 (only effects.js and scriptaculous.js required)
- Prototype JavaScript Framework 1.6.0

To install Spellify on your pages add spellify.js, prototype.js and scriptaculous.js on the tag of your page:

<script src="spellify/prototype.js" type="text/javascript"></script>
<script src="spellify/scriptaculous.js" type="text/javascript"></script>
<script src="spellify/spellify.js" type="text/javascript"></script>


...and copy the HTML code you find in the step 3 of this page. Then add a form with some fields like these:

<input type="text" id="search" name="search"/>
<input type="text" id="city" name="city"/>


In this way, all fileds will be cheked while an user types a word into them. Spellify can also ignore a specific text field by setting its class attribute to spellify_ignore. For example, if you want to ignore the input field "city" use this code:

<input type="text" id="city" name="city" class="spellify_ignore" />


Take a look at the spellify official page for a live preview.


2. GoogieSpell



GoogieSpell is a Gmail like spell checker that you can use in your own web-application. It support for around 27 languages; well tested and works on IE 5.5, IE 6.0, IE 7, FF 1.0+, Safari, Opera etc; generic, extendable and easy to install; AJAX based (without page-reloading; Lightweight (around 50 KB); Well documented and with GoogieSpell Multiple it's possible to spell check multiple text fields at once. Take a look here for the demo and for the code.


3. Ajax-Spell



Ajax-Spell is a useful spell checker for HTML text area which requires at least PHP 5 and either pspell or aspell. The only thing you have to do to work with ajax-spell is to include spell_checker.js and the MooTools javascript library in the tag of your page and add the class spell_check to any textarea you want to have a spell checker added to.

For example, add mootools and spell_checkers.js in this way:

<script src="mootools.js" type="text/javascript"></script>
<script src="mootools.js" type="spell_checker.js"></script>


... and add a text area like te following:

<textarea class="spell_check" rows="12" cols="40" name="text"></textarea>


Take also a look at this page for other information about this script.

4. ActiveSpell



ActiveSpell is a free ajax script to implement spell checking on any text box. It's maintained by ActiveCampaign, Inc and is based off of Ajax-Spell by Garrison Locke. You can fina download it here.

5. PHP Spell Checker
This simple PHP Spell Checker is used to spell check any of the input field of the HTML form. It is useful for webmasters who want to add spell checking to any text box (textarea) on their website or corporate intranet. The script is designed not to mess any way to your main script processing of the form. It just return modified (already spell-checked) text into any input field. It is written on PHP and using JavaScript as minimum as possible. Take a look at this page for more information.

Hope the toostep team will use these free resources to meet the needs of its users.

Monday, June 8, 2009

Modeling vs Coding

You have heard about modeling that will replace coding. Or maybe you haven't?

So, quick explanation. Modeling creates metadata. The metadata is interpreted by some framework or engine. The framework or engine run something according to the metadata thus, according to the modeling.

Nice, no coding for the one who models, very sophisticated coding for the one who writes the engine.

But is it true, is this really the next step in world of software development?

First, what does it mean to model?

You start with a modeling environment, hopefully, a graphic one. You start to draw some model. After the easy graphic phase of drawing some shapes and name them, you start with the details.

The details are never easy. You think about the relationship between the shapes you just draw, you think about the process that these shapes are part of.

Congratulations, you are programming!!!

It is not code, it is partially graphical, but it is coding in a new language.

So, what would you prefer?

Coding or Modeling?

Please leave your answer in the comments below.

Tuesday, May 19, 2009

Programming magic: Rituals and habits of effective programmers

"Programmers may not think that their rituals are unusual, but if you swear that your code is less buggy if you recite it aloud or you prepare for coding by listening to certain music, don't be surprised if you get a couple sideways glances. In a recent ITworld article, Issac Kelly, Lead Developer at Servee.com, explains his routine and why it works: 'To me, programming is really the 'last mile' to getting something done. When I do the planning and specifications, I go on lots of walks, take lots of time with my wife, and really do as little work in front of the computer as possible. The more I plan (in my head, on paper, on a whiteboard) the less I program; and all of my rituals are to that end.' His ritual goes like this: 'Before sitting down to a coding session, he gets a big glass of water, takes everything off of his desk, and closes out all programs and e-mail, keeping open only his code editor. The office door is shut, and some sort of music is playing ('typically an instrumental only, like my 'Explosions in the Sky' pandora station,' says Kelly).'"

Read the full story here.

Tuesday, April 28, 2009

Agile programming works for the solo developer

Agile programming, a.k.a., extreme programming (XP), has a lot to offer the lone developer. Learn how agile programming's practices can bring order to solo development efforts.

You may not realize it, but if you’re a software developer who works alone, you may already be using a lot of the concepts behind agile programming, also known as extreme programming, or XP. Of course, certain agile programming practices, such as pair programming, simply don’t apply, but the organic nature of the agile methodology easily lends itself to rapid application development, even for the solo programmer.

I’ll step through the relevant practices of agile programming and how they can facilitate application development in the one-man shop.

Agile programming overview

The agile programming methodology is divided into four activities and deployed with an iterative style. Planning, designing, coding, and testing are all performed in bite-size pieces. These steps are revisited when needed or according to schedule.

When you’re developing alone, it’s easy to just dive in and assume that you’ll be able to handle whatever problems arise. Agile methods can facilitate the process, however, and will actually help you avoid the lag that comes from struggling with a less organized approach.

I’m an independent application developer, as are many in the current economic climate. As of this writing, I’ve got four separate projects. While I can easily manage requirements and progress status for each of these endeavors, I’ve found that the time needed for sourcing, ramp-up, and development is greatly reduced simply by applying a little order to the chaos.

Borrowing relevant agile programming methodologies has worked quite well for these projects. For one thing, agile programming isn’t heavy and doesn’t require an inordinate amount of overhead. Also, every piece of planning is immediately useful, and my clients get a sense of constant contact and the instant gratification of regular updates. The practices defined by agile programming help me put a simple structure behind my work. This lets me focus on getting things done, but it also supplies the environment I need to adapt to and incorporate changes without disrupting progress.

When you’re working alone on a project, planning is easier with the agile methodology than with spiral development or the other methods I’ve worked with. In fact, much of the process comes naturally to the lone-wolf developer. By picking and choosing the pieces that fit, these practices are well suited to working alone.

Agile planning

You may find that you’re already using many of agile programming’s planning practices, although perhaps in a more informal manner. Try tweaking your diligence slightly, and you’ll discover some of agile programming’s tremendous benefits in this area.

User stories

User stories are a way of capturing what I call “the flood.” This is similar to requirements gathering in traditional development methodologies, but it differs in that technical details are omitted and work to be performed is described in plain English, broken out into two- to three-week sections. Each user story is written onto an index card and used to plan releases.

Since one-man projects tend to be small, I generally break the user stories into shorter duration blocks. Of course, this goes against the rules of the “planning game” and ultimately quickens the iterative rhythm; however, the same basic principles apply.

Releases

A release consists of user stories grouped together based on dependencies and business need. Agile programming releases are not partial deployments but rather represent completed, logically grouped portions of functionality. Scope or duration can determine a release, and functionality is chosen by common sense and priority.

As with team projects, keep releases short. Each release comprises several iterations and is largely determined at the beginning of the project. Organize releases by grouping the user story index cards together. This allows you to keep the customer satisfied with frequent deployments, and it helps keep the focus on the big picture.

Just-in-time planning

Once you have an idea of the releases, determine your iteration length. An iteration should be one to three weeks in length, and there should be three or four iterations per release. Even with shortened user stories, I’ve found that sticking to the low end of this guideline works on lone projects, as long as I make sure that all iterations are about the same length. Otherwise, it’s too easy to break away from the agile model.

Define iterations by selecting the most important user stories and breaking them down into programming tasks. Involve your client in deciding what task has the highest priority, and always plan to complete it first.

Iteration planning should be done at the start of that iteration and not before. This may seem somewhat shortsighted, but it keeps you focused. Discrepancies will be resolved in future iterations.

Designing the solution

Designing your solution with the agile methodology is simple. It’s spread out over the course of development, rather than being completed up front.

Class cards

Create index cards representing objects and classes. Use the cards as you would boxes on a diagram to demonstrate the objects’ relationships. Keep it simple, and refine the layout with additional detail when planning an iteration.

Refactoring

As you move through the project, take time to clean up your code and consolidate functionality. This is called refactoring, and it allows the system architecture to develop logically and organically. Every iteration should include time for restructuring; the class cards can show where it may be necessary.

Spike solution

When you encounter a tough problem that lacks an immediately apparent solution, create a spike solution. This is where you try out different approaches in code to make the correct solution more apparent. This happens all the time in independent development, and it may not require the level of formality that agile programming calls for.

Other design principles apply as well, but many are somewhat inherent when the team is a single person. For example, it’s a good idea to name objects and other system elements consistently, but as an individual, you probably don’t need to formally create a metaphor.

Coding guidelines

Much of the coding guidelines for agile programming refer to management of teams, but a few concepts are worth adopting.

Client contact

Frequent contact with the client is crucial for the deferred planning of this methodology. Not only does frequent contact help clarify details and prioritize tasks, but it’s also a great management tool when you work alone. It gives the client confidence in your ability to deliver and keeps the client abreast of your progress.

Testing framework

Create unit tests before writing code. This might seem a little like overkill for small projects, but it actually keeps the scope in focus and limits development to the requirements. Code enhancements and additions must be completed in a separate iteration, facilitating quality assurance.

Even though it’s a good idea to create a testing framework, less formality is required for one-man projects. Since I usually wind up writing code and interfaces, I use preliminary interfaces with debug flags as my test mechanism for back-end functionality. Although this isn’t as stringent or long-lasting as the agile methodology’s preferred practice, I’m comfortable that it meets my needs.

As extreme programming enthusiasts are quick to point out, the process is designed to be modified to fit your needs and changed when it isn’t working.

Test before moving on

Once you’ve completed coding a particular piece of functionality, make sure it works before moving on. This is one of the ideas behind creating unit tests up front. When the relevant code has passed the unit test, it can be integrated. After completing all tasks for a user story, apply functional tests to ensure all requirements are met. When you find serious bugs, modify your testing to check for them after they’ve been fixed.

When you’re working alone, this is pretty much the natural progression of testing code anyway. By creating formal tests before writing code, it’s evident whether a piece of functionality works or not.

Bringing structure to the soloist

These are some of the principles of agile programming that apply to solo development. I picked up these habits on a recent project as an experiment to see if I noticed any improved efficiency. It took about a month to really get into the habit of not solving problems before their time and being diligent about refactoring, but my productivity increased once I got a rhythm going.

I really like the way the client took an active role through continual contact, and forcing myself to create test cases before writing the code facilitated development. If you’re a single developer, agile programming can give structure to your process.

ShareThis