 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Refulz Blog: Yii Framework - Scenarios for Conditional Multiple Validation Rules
by Chris Cornutt April 24, 2012 @ 09:18:49
On the Refulz blog there's a post showing you how to set up conditional multiple validation rules in a Yii framework application.
I am yet to write the last article of the Yii Session series. I just decided to write something about the scenarios in the Validation feature of Yii framework. Scenarios are a very useful tool for adding different validations rules for different cases on the same model. In a real life situation, you would require one validation rule for user registration but the same rule might not be applicable to the User login. Scenarios help you define validation rules for different situations within same model.
He shows you how to set up a "rules()" method in your model and a few validation configurations inside it - ensuring the password and email are set, checking the length of the password, etc. Then, by calling the "validate()" method on the model, you can easily apply these rules and check the pass/fail status.
voice your opinion now!
yii framework validation model rules tutorial
Kevin Schroeder's Blog: What programming rules should you ALWAYS follow?
by Chris Cornutt November 09, 2011 @ 09:20:37
In a quick new post today Kevin Schroeder asks his readers for feedback on what programming rules you should always follow in your development practices.
Earlier today, more for my own interest, I asked the question on Twitter "What programming rules should you ALWAYS follow, regardless of the scenario you're working in?" In other words, are there programming rules that you ALWAYS should follow. It doesn't matter if it's a script to copy a bunch of files for a one time migration or if you're building the next Facebook (DON'T try to build the next Facebook. You will fail miserably. Build something else). In other words, what was the purist of programming rules.
Responses he received ranged from the simple to slightly more complex including:
- Always comment your code
- Test your code
- Use source control
- "Think. Think again. Then write code"
- Use a good debugger to help track down problems
- Make effective use of logging/output
voice your opinion now!
programming rules opinion recommendation twitter
Noupe.com: Ten Simple Rules for Choosing the Perfect CMS + Excellent Options
by Chris Cornutt July 13, 2009 @ 12:13:56
Noupe.com has a few suggestions for you when you go to pick out your next content management system with ten guidelines that can help:
The content management system you choose can really make a huge difference in how much time you (or your clients) spend keeping a site updated and maintained. There's a huge variety out there-some estimates put the number at around 1700 different options. Some are great...some, not so much.
Among the suggestions are things like:
- A CMS needs to work intuitively.
- The backend needs to be logical and well-organized.
- The right CMS shouldn't have a ton of extra functionality you'll never use.
- The right CMS should be easy for non-geeks to use.
- The pages it creates should be fast-loading and have simple code.
They also mention a few options available that might be a good fit for you and your organization: WordPress, SilverStripe, Joomla! and a few more.
voice your opinion now!
suggestion cms choose rules
Nick Halstead's Blog: PHP Programming Contest - Win Zend Studio
by Chris Cornutt June 14, 2007 @ 07:11:13
Nick Halstead has announced a contest on his blog today for PHP developers everywhere to participate in - a programming competition surrounding a challenge he's created.
It has been a lot harder than I thought to come up with a fair programming challenge that would not take too long or require lots of knowledge in any particular framework or other associated technology. It could have been to make use of a whole host of currently available API's and to make a useful mash-up but these again require other external knowledge beyond just PHP. I finally settled on a logic problem that is hopefully not too hard to solve but will test a range of PHP skills.
The problem he's worked up involves changing a word, one letter at a time, into another word using user-defined lists and choice of word. There's several requirements you'll need to follow an d rules for things like the submission process and what server setup can be used.
So, what's the motivation? First prize is a copy of Zend Studio Professional and a year of support, second prize is a Zend t-shirt, and third is a Zend Pen. For full information on participating and on all of the rules you'll need to follow, check out Nick's full post.
voice your opinion now!
zendstudio programming contest rules prize problem solve zendstudio programming contest rules prize problem solve
International PHP Magazine: Poll Question The Rules of PHP Throwdown Include
by Chris Cornutt December 05, 2006 @ 15:46:00
The International PHP Magazine has posted the results from their latest poll of the week. This time they asked the slightly odd question of opinions on the PHP Throwdown event - "The Rules of PHP Throwdown Include".
Seems like the question might have confused some others because the votes were notably lower than in some previous weeks. There was a tie for first place, though - both coming in with 6.8% of the votes were the "You can use PHP4 or PHP 5, MySQL or SQLite, Ajax, HTML, XHTML, and Javascript but no Flash" and "All" options. Dead last with no votes was the "All applications must be licensed with a CC compatible license" option.
They've also posted a new poll for this week asking which of the options you think still ring true when it comes to PHP:
- PHP administrators like to compile PHP in Summer
- Register global is not dead
- memory_limit is not used
- PHP applications handle 100 Mb files
voice your opinion now!
throwdown rules poll question php5 mysql ajax html license throwdown rules poll question php5 mysql ajax html license
Lorenzo Alberton's Blog: PEARPager Tutorials
by Chris Cornutt September 19, 2006 @ 07:31:52
Lorenzo Alberton has posted a tutorial today about using teh PEAR::Pager package to create "pretty links" with a little help from mod_rewrite.
Most PHP pager classes can work just fine with GET parameters, correctly forwarding them through the pages. Few of them let you control the navigation links they create, though. This can be particularly annoying when you have some nice urls (thanks to some mod_rewrite rules o to your hand-crafted front controller) and the pager class can't respect them, showing the real, ugly links to the world.
If the above scenario is not new to you, then you should probably have a look at PEAR::Pager. It's a fully customizable package that should satisfy all your needs, including your preferred link format.
In his examples, he provides the mod_rewrite rules to use, a sample PHP script that would normally use the $_GET values (in an ugly URL) to paginate the results. He also compensates for if the page number is actually a part of the path and not just at the end of the file name.
voice your opinion now!
pear package pager tutorial mod_rewrite rules get page number pear package pager tutorial mod_rewrite rules get page number
|
Community Events
Don't see your event here? Let us know!
|