On The Web

Resources on the Web

clphped

Free PHP, HTML, CSS, JavaScript editor (IDE) – Codelobster PHP Edition

2

Introduction

I do not normally post anything related to IDE’s but I thought this article was worth as it supports Yii :) as one of the frameworks of the IDE. Thought this could be a good IDE for those Window Yii’ers out there.

Codelobster

For valuable work on creation of sites you need a good comfortable editor necessarily. There are many requiring paid products for this purpose, but we would like to select free of charge very functional and at the same time of simple in the use editor - Codelobster PHP Edition.

Let us consider some important possibilities and advantages of this program:

  • All code highlights depending on a type, the also mixed code is thus supported, so the area of HTML will be highlighted as HTML, PHP as PHP, and Javascript as Javascript in a the same file. Thre is possibility of choice from color schemes, including popular IDEs.
  • Powerful autocompletion for HTML, PHP, CSS and Javascript, including HTML5 and CSS3. For PHP the structure of project is fully recognized, and the complete list of methods falls out in the proper places.
  • HTML/CSS inspector on the type of Firebug, which allows easily to correlate the selected elements of page with a code and proper style.
  • Context help on all supported languages. By pressing F1 key the page with detailed description for current tag, attribute or function will be opened.
  • PHP debugger. PHP debugger allows to execute PHP scripts incrementally, watching the values of all variables in every line.
  • SQL manager allows to produce all necessary actions with a database – to add, delete, edit a structure and records in tables, to export data, execute SQL queries. Highlighting and autocompletion works for SQL files also.
  • Support of FTP allows to work straight with a remote server and to do all necessary changes with files;
  • The portable option allows to use editor without the preliminary installation.
  • Other useful utilities: pair highlighting, possibility of blocks selection, collapsing, tooltips, navigation on descriptions of functions and included files at withholding of the key of CTRL, viewing of structure of files and project, preview in a browser, book-marks, and all other standard possibilities for work with a code.

Also there are special plugins for work with

  • CMS: Drupal, Joomla
  • PHP frameworks: CakePHP, CodeIgniter, Symfony, Yii
  • JavaScript libraly: JQuery
  • WordPress blogging engine
  • Smarty template engine

How to work with Yii and CodeLobster


Tweet this!Tweet this!
yiia-twitter-logo

Yiianswers, a new site for yii lovers

0

I would like to introduce a new site that a good friend of mine and work colleague Maurizio Domba (mdomba) and I have setup in order to solve an issue that actually occurs at the Yii forum and help the Yii community with what we think could be a great tool for their learning or development processes: Yiianswers.com

Don’t get us wrong, the forum is amazing, highly addictive (you can check our profiles -mdomba an tonydspaniard to find out how we love that forum) and very useful thanks to the support of a lot of good programmers that freely give aways their time to help others get the right answers, in order to push Yii to the level where it supposed to be in terms of PHP community acceptance.

Nevertheless, one of the things that we face as the forum grows is that the same questions are repeated again and again, and we believe that this is not because users do not know how to search for a solution but for the structure and functionality of a forum itself. We always thought that could be great to have a site to keep questions and its solutions in a categorized tree where people could easily browse, search, and/or find what they are looking for, and this is why Yiianswers.com is here.

Yiianswers.com is an instant Questions and Answers site, so popular nowadays. We really hope that will help you out and will easy the task of finding the right answers to your Yii questions.



Tweet this!Tweet this!
create-professional-invoices-for-free-invoice-bubble

Invoice Bubble -Create Professional Invoices for Free

0

I have lately found a very interesting service for those who work as a freelance to create really cool invoices; it is called Invoice Bubble.  With this service, which is totally free (it inserts some ads that can be removed by paying a very low monthly fee $5 USD), you can create your own invoices, send them to your clients and get paid via Paypal.

It is quite good and has an excellent design; also, you can create recurring invoices and keep track of the payments from the control panel.

Tweet this!Tweet this!
Captura de pantalla 2010-09-12 a las 12.00.32

Less Framework 2

0

All of us know how hard is to get a proper CSS layout for our pages. Thanks to 960 grid system we developers were able to solve some of the issues that we face when we design for different browsers. Now, new devices coming aboard such as Android, iPhones, Blackberry’s and their browsers and the nightmare continues. Nevertheless, nice people like those of 960 grid system give away their approaches and solutions in order to make our life’s easier. Less Framework 2 comes to help us:

A CSS framework for cross-device layouts

Everyone writes CSS differently. Less Framework takes this into account by having a minimal set of features, and does away with things like predefined classes.

No more 960 px

Less Framework uses inline CSS3 media-queries to switch between three layouts:

  • a two-column layout at 320 px, for smartphones
  • a five-column layout at 768 px, for iPads and netbooks
  • and an eight-column layout at 1280 px, for desktops and laptops.

No hacks, unless you want them

Less Framework works beautifully in Firefox, Chrome, Safari, Opera, IE9 (hopefully), Android phones, and all iOS devices (that’s all iPhones, iPads, and iPod Touches). It even behaves nicely in landscape mode.

Tweet this!Tweet this!

Yii Framework

Yii Framework -Final Decision

2

I never felt comfortable with external libraries, those created by other people. Always, since my old times with Visual Basic, have created my own and until now, everything I created was good enough but… Suddenly, after I found that marvellous library called RedBean, I found my self re-programming all my libraries and end up creating a controller and a base model class for a sort of MVC library – I will post it one of these days so you guys can look at it and find out how easy is to implement that incredible library is (thanks Gabor de Mooij!) on your libraries.

But, as a programmer, I started to think that, even though my own libraries speed up my development processes, I want it to be hands on a bigger and more ambitious projects -that happened long time a go but never felt impressed by any library out there. My libraries lacked on scalable development architecture and had to find for a better solution for a much bigger project I am jumping right now. I google around and found interesting offers as exposed on one of my old posts:

Actually, far too many, so I took my time to decide for one to suit all my needs. Checked around and read some good articles about Yii framework and then, telling the truth, I was very impressed with (information taken from http://programmersnotes.info:

  • 100% OO architecture. It is really good application design.
  • Authentication & roles mechanism
  • Caching techniques
  • DB access, which is based on PDO
  • Active record and relational active record implementation
  • Validation – that is really, really nice. To create quite complex register form (check if login is unique, if email is unique, email match with confirmation, passwords match, validate integer/string values, check empty fields and give nice error messages for each field you need only template (view) and model with rules defined. It took me 10-15 mins to do that!)
  • Component concept. Just to give an idea, why is it nice – you can define getter and setter methods for properties, you can define read-only properties for components, define and invoke events, attach event handlers and additional features to the class without modifying it, just by attaching additional behaviour to it
  • Also, check its graphical benchmarking against other MVC frameworks http://www.yiiframework.com/performance.

Wondering whether DooPHP (claiming is the fastest at the moment) or Yii, I finally decided to use the latest due that DooPHP is quite new and Yii has a huge amount of features and tweaks that, even its documentation is not the best (I just read their Definitive Guide and I think I will have to read to a couple of hundreds articles more to be ‘good’ at it), I think at the end will become the Toolset for highly scalable projects -using its automation tool called Gii, I did the skeleton of a project in less than 30 seconds -duh!.

In addition. last but not least, you can integrate Zend components easily and jQuery is nativelly implemented -and I loooooove jQuery.

For the small ones I still like my own libraries though :)

Tweet this!Tweet this!
Picture-121-300x157

Speed Up Your Pages With Lazy Load JQuery Plugin

2

I would like to introduce you this simple but very efficient plugin that will help us speed up the downloading time of our web pages. I am talking about mr Mika Tuupola’s Lazy Load JQuery Plugin.

This plugin loads the images of a web page as the user scrolls to their position, that is, images wont load until they are not within the visible viewport margins of the window.

How to use

First we need to insert the following references into our code

<!-- insert a reference to jquery and the jquery.lazyload plugin -->
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.lazyload.js" type="text/javascript"></script>

And now this few lines of code in our document.ready function

<script type="text/javascript">
$(function() {
          $("img").lazyload({
              placeholder : "img/grey.gif",
              effect      : "fadeIn"
           });
       });
< /script>

And that’s it! Easy right?

Tweet this!Tweet this!
redB

RedBean ORM

1

I was breaking my head towards to find a better ORM approach for my own written framework. I used, and was very happy with P.O.R.K., for quite long time but, as most of us, I was looking for something that could improve the speed of my projects. P.O.R.K. configuration is not hard at all, it is compound of a set of classes encapsulated in three files that allowed me to create models in sort of ActiveRecord style and was really, really good when I first started.

Now my projects are bigger, require a lot more of database analysis and those sometimes go up to 30 tables or more. That means that once analysed a project, I had to create those tables in the database, specify their fields and so on… you know.

I found my self into the lazyness mode and I was already thinking that it could be great to create a set of libraries that do not require any configuration files at all and could manipulate my databases in such a way that not only queries for data but also dynamically creates the tables for me if they do not exists. That could save me around one or two days of work I thought…

Before creating anything I ask mr ‘Google’ if there was something around that could match my concept (never reinvent the wheel) and OH MY… I found it, its name is RedBean and I have to say that is one of the greatest libraries that have ever came across.

How it works

Create a database

Include the required files to work with RedBean -one file: redbean.inc.php

include('mypathto/redbean.inc.php");

Access its core:

//Assemble a database connection string (DSN)
$dsn = "mysql:host=localhost;dbname=mydatabasename";
//Connect to database and fetch the toolbox; either with password
$toolbox = RedBean_Setup::kickstartDev($dsn, $username, $password);

Now, just for this example: creating one Bean

$rb = $toolbox->getRedBean();
// lets create one object that we didnt even declared anywhere :)
$post = $rb->dispense('post');
// set some variables -fields
$post->title = 'This is magic';
$post->created = date('Y-m-d');
// save newly created object to database (how come?)
$rb->store($post);

If we were to look onto our database, we will find now that a new table is created called ‘post’ and your bean has successfully saved its properties.

Of course, this is a silly example, in my case I am using redbean on a MVC ‘modified’ pattern (I don’t like the ‘View’ part as it is implemented in modern frameworks and for small projects I use my own approach). Please, have a look to its manual, trust me, it is worth a try.

From the deep of my heart, THANKS for such a great job to his developer mr (Gabor) de Mooij. At last, one EASY yet POWERFULL library for our projects that really help us saving developing time.

Tweet this!Tweet this!
Captura de pantalla 2010-06-03 a las 12.54.16

Zend Server CE Personal Experience

12

I would like to tell you all about my ‘incredible’ experience with one of the new Zend Tools called ‘Zend Server’. 
Have you ever experience a series of ‘impossible things’ that happened one after the other without any comprehension? Well, that happens to me with Zend Server CE.

I am currently running a MacOSX Snow Leopard on a 17 inch MacBook Pro for the development of my projects and I have the built in Apache, PHP 5.3.1, and MySQL 5.1 as a backend DB. I do work with Dreamweaber CS4 to develop the GUI interfaces together with PhotoShop and Fireworks (all from Adobe Creative Studio CS4) and use Eclipse modified for PHP and Javascript developments. To debug my client-side code I do have Firebug and that’s it.

If I tell you the truth everything was working fine, but I wanted to tweak a bit more the performance of my code (we all do that), so I checked the Zend Tool Zend Server CE. Its documentation was quite good and for the comments of the rest of the programmers I thought was worth a try. This is what happened:

  1. download and install Zend CE Server
  2. restarted my computer
  3. started Zend Server
  4. damn, nothing works here, nothing! my computer suddenly slows down, what is happening?
  5. looked at the processes, my God! mr Zend Server had five PHP opened at the same time as a service! And also a service controller that doesnt allow me to stop any of the Services!
  6. how should i stop this? info: http://files.zend.com/help/Zend-Server-Community-Edition/mac_osx_installation.htm
  7. this info is even worst, where is installed? where all those scripts that the documentation is talking about? on the Applications folder (where is installed) there is nothing as what they are saying
  8. found it (have to view hidden files in my Mac, done -defaults write com.apple.finder AppleShowAllFiles FALSE) with a full Mac Search (thanks spotlight)
  9. uninstalling application
  10. restarted computer
  11. going to code a bit, going to Applications folder… diablo! my Finder crashes!
  12. found tones of info, none of them worked -.DStore, .launch Services, .Onyx, etc, reinstall Snow on top, not a fresh install… reboot, Finder still crashes
  13. building backups (Time Machine is quite old -a week?), whilst in the process… see next
  14. looked onto Apache XAMPP install (I do not use it anymore), what??!! htpdocs and all mysql databases GONE!
  15. i rund around my house screaming, yelling, and asking God why this is happening to me thousand times! -dont laugh, you probably did it a couple of times too
  16. Worked with Data Recovery, FileSavage, and some data recovery programs that didn’t help at all… where are all those files?
  17. last solution: fresh install Snow Leopard, Carbon Copy Cloner and TimeMachine working together for a scheduled daily backups.

Well, thank you very much Zend Server, you obviously helped me to improve the performance of my code as I had to rebuild all those libraries that weren’t backed up before making my code faster, cleaner and easy to implement and use… woaw, unreal.

Also, thanks Zend Server CE as I reinstall my OS, having only those apps that really are part of my development process and making me buy a 1.5 TB external drive to have all my backups saved daily. If it wasnt for you I wouldn’t bother spending my money on such things. You rock Zend Server!

Tweet this!Tweet this!
ipad_hero_20100403

Technology Exact Production Costs?

2

Over the past months we have heard right and left about the new comer and so called great tool ‘iPad’. Now, it is the best tool to interact with Internet, to view-share your photos, to blah, blah, blah… Again, the same story. So, marketing wise, Apple is unreal, their designs, their messages, their ‘hey people wait that is something even greater to come’ is remarkable but let me ask you guys, what is the exact point of so much technology nowadays if most of us, mere mortals, dont have a freaking clue on how the hell all those house-work-devices really work? I bet that 90%, if not 100% of us, don’t use all what a machine-device is capable of. I am a programmer and I don’t even use the full potential of my Blackberry, are you doing something I don’t? I guess not.

For me, and this is a humble opinion, so much technology is crap. Filing the gap between phones and/or netbooks and computers? What a great marketing concept but what a waste of time.

Also, let me share with you something I read on the http://www.independent.co.uk/:

The Foxconn factory in the southern Chinese boom town of Shenzhen is so vast that walking around its outer perimeter takes two hours. Its workers turn out components that are supplied to big Western electronics brands including Nokia, Hewlett-Packard and Dell. And it is here that most of the parts for Apple’s iPhone, and the much-awaited iPad, which goes on sale in the UK this week, are manufactured.

Yesterday, Li Hai, a 19-year-old employee of the firm, jumped from the top of the building in Shenzhen to his death. It brought the number of suspected suicides at the factory this year to 10. There have been another two attempted suicides.

All of the deaths have been of youngsters between 18 and 25 years old. Li Hai had only been working at the plant for 42 days. The incidents have prompted intense soul-searching in China, about conditions in its factories and the social cost of breakneck economic development.

Here you go and yes, we can all excuse our selves saying that, they have chosen the job, they decided to finish their lifes… whatever. The truth is that we don’t really know what happened to the minds of those youngsters and in which circumstances they had to work… Maybe they were forced to work for their families survival, we don’t know. The only thing that matters is that we had iPad right in time, isn’t that true mr Steve Jobs?

In 1984, Apple next launched the Macintosh. Its debut was announced by the now famous $1.5 million television commercial “1984″. It was directed by Ridley Scott, aired during the third quarter of Super Bowl XVIII on January 22, 1984 and is now considered a watershed event for Apple’s success and a “masterpiece”.

Mr Steve Jobs, you are not different from IBM.

Tweet this!Tweet this!
 

Bookakar.com Finally!

0

Finally, after long time of work, the first release of my own company: bookakar.com.

I have implemented lots of concepts widely spread throughout the Internet and I truly hope that they all work. Still, lot of work to do but as soon as I have spare time I will share with all of you guys lots of PHP and JS bits and pieces that I hope we, all together, could improve in order to make a great Open Source Resource for everybody to use.

For example, I have developed a set of PHP classes that help PHP programmers to implement GMaps without the need of Javascript knowledge.

I can wait to share…

Anyway, any feedback related to my site will be highly appreciated. One more thing and very important: I DO NOT SUPPORT INTERNET EXPLORER due to its security pitfalls on the bank payment gateway and its sillly way of understanding CSS rendering and styles -and I don’t mention its JS engine at all.

Bookakar.com works only on two Spanish areas: Alicante and Ibiza, but it will grow to other areas very soon.

Tweet this!Tweet this!
Go to Top