SharkOS.org

SharkOS Blog

What Lurks Beneath The Surface
  • Home
  • About
  • Development Projects
Rss feed Subscribe | Add to Google

Book Review: Codeigniter 1.7 – Packt Publishing

May.03, 2010 in Book Reviews Comments Off

Review

Book Cover : Packt Publishing - CodeIgniter 1.7

Book Cover : Packt Publishing - CodeIgniter 1.7

“CodeIgniter 1.7” by Packt Publishing is a guide book and technical introduction to the well known PHP Application Framework, CodeIgniter. The book, written by Jose Argudo Blanco and David Upton takes the reader through the architecture of the MVC design pattern, and the CodeIgniter implementation. Throughout the book, the authors continually point you to CodeIgniter’s official website and documentation which enforces the concepts in the book. The CodeIgniter getting started guide included with the code is a great guide, but this book really gives the learner a more focused and detailed training on the concepts, features, and functions of the framework.

PROS:

Throughout the book, the authors describe various ways to accomplish the same task, whilst pointing out the easy way vs MVC technically correct way. This helps to demonstrate the flexibility of the framework, yet try to instill best practices onto the reader.  Other best practices that are continually re-enforced throughout are the constant pointers about Security and SEO. I like this approach better than some other books, where security is an after thought or a chapter later in the book. “CodeIgniter 1.7” continues to demonstrate how the developer can write better, safer, optimized web applications from start to finish.

The ActiveRecord and CRUD concept is also an area where this book shines. Demonstrations on the power of the various CRUD calls in relation to the database, including Transactional SQL are extremely helpful. Along the way, common pitfalls are pointed out to avoid.

CONS:

The observant reader and skilled programmer will pickup on some minor errors and occasional inconsistencies in the grammar and syntax of the code. A skilled programmer can easily work around these errors; however, it could pose frustrating to the absolute beginner.

For RAILS Developers:

For RAILS programmers interested in exploring PHP frameworks, they will find CodeIgniter a very useful framework. Although, other frameworks such as Symphony and CakePHP are much more complete, and offer many of the same features as RAILS; CodeIgniter is an excellent choice for those looking for a more barebones toolkit. One of the more frustrating aspects to the 2.x version of RAILS is that you can often times be “Jailed” into things working “The RAILS Way” rather than what you would expect. You might also often times find yourself having to either create a workaround or re-invent the wheel to reach the desired result. This often wastes a ton of time.  The authors of this book continually express the concepts behind the freedom of choice offered by the CodeIgniter framework.

Conclusion

I recommend this book to anyone beginning an application using a PHP Framework. Before starting this book, one should be familiar with at least the basic concepts of Web programming, object orientation, minimal SQL, and some basic knowledge of the PHP Language.  Should you choose to use another framework or even frameworks in another language such as Ruby on Rails, Groovy Grails, or Spring, the basic concepts provided in this book are certainly worth understanding. In order to select a language and framework, it is important to learn about what is available.

The folks at Packt Publishing have really been putting together a great library of Technical Books these past few years. For every book that Packt sells on a particular project, they will donate a portion of the proceeds to the OpenSource project. So be sure to visit their online store and help support your favorite OpenSource project… You might just learn something along the way.

Upcoming Book Review – Packt Publishing: CodeIgniter 1.7

Apr.06, 2010 in Book Reviews Comments Off
Book Cover : Packt Publishing - CodeIgniter 1.7

Book Cover : Packt Publishing - CodeIgniter 1.7

As a new feature of this website, I am starting a book review category of posts. Over the years I have purchased many books from many different publishers. Most recently, I have been purchasing titles from Packt Publishing. I’ve already purchased several of their books such as a title on JQuery, Backbase 4 RIA Development, and most recently, CodeIgniter 1.7. As a Kindle owner and consumer of E-Book’s, I am pleased when a publisher offers their books in both Hard and Soft copies, and bundles them with a discount. Packt has a great selection of books for software developers and other aspects of computing.

Why a PHP Framework Book? Aren’t you a Ruby developer?

As a Ruby and Rails developer, I have often come across limitations or shortcomings of the Rails framework that are often times frustrating. Sometimes these frustrations lead to wanting to hack past or create workarounds, and sometimes these make a programmer feel dirty and unsatisfied with the outcome. A major issue with this is the fear that a future upgrade of the base application framework might prevent such code from working in the future. As I read through the Packt book titled: “Backbase 4 RIA Development”, I came across lots of example code for handling ajax querying on the server side, but most of these examples are in PHP.  I’ve always been somewhat sour about the PHP language as a whole due to the challenges with security, issues with upgrade paths from 4 to 5, and overall code mixins with HTML that to me seemed dirty. One of the best features of MVC style frameworks such as RubyOnRails is the separation of application logic from the views.

Now that there are several PHP frameworks that have taken the MVC approach and are considered mature, I decided to explore the realm of PHP programming. After researching these frameworks, I narrowed down my selection to 2 frameworks in particluar, CakePHP and CodeIgniter. I tested each of these, and found CakePHP to be a lot like RAILS, with its own commands, and similar functionality. One of the things I liked about alternative Ruby frameworks such as Ramaze and Sinatra was the elimination of using a command set to perform simple operations such as creating a model and scaffolding. Half the time, I find myself rewriting the entire scaffold, and I don’t really care about database migrations that rails offers because I prefer the control of doing it myself. CodeIgniter offer this control in PHP, by providing a solid base without the overhead and complexity.

Thanks to folks at Packt for publishing several books on this framework, I am excited to provide a review of the book from the perspective of a Ruby developer.  Stay tuned in the next few weeks for the final draft.

Site Update 20100330

Mar.30, 2010 in Site Announcements Comments Off

Its been almost a full quarter since I’ve posted here, so its about time for an update. I am no longer focusing on ArchLinux as the purpose of this blog.  Sorry ArchLinux folks, but the sharkoslinux repository & my packages are no longer maintained and I have dropped ownership of my AUR PKGBUILDS. ArchLinux is a great Distro, and perhaps I will eventually return to contributing to it.

The majority of my work is currently focused on the OpenTelegard project. This is a large project built using JRuby to recreate the Telegard BBS project. Its a lot of fun and has allowed me to put some Ruby skills to work. OpenTG has taken on the MVC style of splitting out the Database, Templates, and Actions into separate calls. This has made it easier to develop. It has also incorporated some Java libraries wrapped into Ruby classes to add functionality and features not necessarily available in Ruby, such as using the H2 Embedded Database (instead of sqlite) and the FreeMarker template engine.

I am also working on a few Rails apps, such as MyBabySays. A fun site for parents to post baby language. Its a kind of Thesaurus for translating baby words to actual words.

Also, for those of you searching for VPS services, I recently moved mine over to SpaceRich.com. They have a great set of features for the price, especially when compared against SliceHost or Linode.

Be sure to check out the Telegard.org website from time to time, as the majoirty of my posts will be there for quite some time as that project matures.

rinit Project Launch: Ruby Initscripts

Jan.27, 2010 in Hosted Projects Comments Off

I have started a new project on RubyForge.org called ‘rinit’.  It is a development project to recreate the Linux sysvinit scripts using the Ruby Programming language. So far, I have a working ‘/etc/rc.sysinit’  and replacement rc.conf in YAML format working on ArchLinux. This project is still in early development and not ready for production. By using Ruby, I hope to be able to leverage some features of that language to streamline, simplify, and extend the current way Linux systems bootscripts are designed. This project is not intended as a replacement for sysvinit such as Upstart. You can visit the project page here: http://rubyforge.org/projects/rinit/

Virtualization on the Linux Desktop

Jan.27, 2010 in Reviews Comments Off

As a Linux power user, administrator and developer, I spend a lot of time working with Virtual Machines. Both at home and in the datacenter. I’ve experimented with most of the mainstream HyperVisors currently available (xen, kvm, virtualbox, vmware). In the datacenter, Virtual Iron was my preferred platform. A xen based hypervisor with a Java based set of  Management Tools, and a great set of features at 1/2 the cost of VMware. Now that the evil empire of Oracle has acquired and crushed the product, we were left with little choice but to consolidate onto VMware.  Oh sure, there was OracleVM, XenSource, and Red Hat’s new RHEV platform. we could have looked at Parallels or some other obscure new solution. But at the end of the day, the tried and true VMware is what all companies seem to choose based on brand recognition.

Most of the above mentioned Hypervisors are great for datacenter loads or server deployments with their expensive price tags, management tools, and optimization for servers. But what about the desktop user?  While I love my Linode.com VM, its great for testing pre-production deployments and for testing scale of an application outside of the local workstation, but not cost effective when I want to have lots of RAM for a short period of time, or need more disc space on the fly. For Linux Desktop users, there are a few choices available. VirtualBox, KVM, XEN, and VMware Workstation.

Let me preface the remainder of this article by saying that I am approaching this topic from the perspective of the following criteria:

  • User experience across any distribution
  • Ease of Install and VM Creation
  • Completeness of graphical interfaces
  • Impact to Operating System as a whole (kernel drivers, package manager, etc)

VMware Workstation

I’ll start with VMware Workstation. This is a commercial product that does cost $$$, however, it has several advantages over its free version cousin (VMware Free Server – see vmware’s website for comparison). Updates are released relatively frequently to fix bugs and  keep up with the changes in the vmware kernel drivers. Although easy to use and fast, VMware can be a challenge to manage depending on the Linux distribution you are using. On ArchLinux, the tarball based installer works fine, but due to the cutting edge nature of Arch, there comes a time when trying to stay current can break your VMware install or things start to get buggy. The same can be true with Ubuntu or its derivatives such as Linux Mint where one day a kernel upgrade happens and the vmware host tool files stop compiling. Typically a search on a set of Forums will find the answer, but its a hassle none-the-less. Other weird problems I have come across is issues with Keyboard such as not being able to type inside of the VM, or the caps lock being stuck or reversed between the Host and Guest OS.

Conclusion: Overall, VMware Workstation is a great product if you don’t mind paying for each major version that gets released. VMware as a company definitly understands Linux and even has open-source versions of the tools. Although annoying at times, it performs well, and has a great set of features and tools out the box.

VirtualBox

VirtualBox is probably my favorite. Its got a great set of tools, a complete GUI interface, Conversion Utility,  packages for multiple distros, well documented, and best of all FREE. This was a great acquisition by Sun and even smarter to keep open-source. Lets hope the Oracle will keep their greedy destructive hands off this product. I have tested almost every OS on Virtual Box to ensure its compatibility. This includes (BeOSR5, WindowsXP, Windows2003, Windows2008, Linux (various distros), OS/2-warp, Ecomstation, Minix, HaikuOS, Plan9, HelenOS, etc…). Overall with positive results. I had only issues with  OS/2 & Minix crashing either during boot or installation.

If running a distro such as Ubuntu or Mint that supports DKMS, then VirtualBox will try to keep its kernel updated during package updates of your system.  There were easy instructions on the Virtual Box site on how-to install for each distribution where a binary is available.  Although not configured out of the box, Bridge networking can be setup for your Guest VMs.

Conclusion: Best Desktop Virtualization solution for Linux Users.

XEN

Xen is a great Hypervisor. Another to fall into the large of a Corporation (Citrix). Although there are tools available to manage XEN VM’s, it seems there are no standards around it. There’s libvirtd, Virt-Viewer, Virt-Manager, oVirt, the list goes on. Of course there is also commercial versions available from Citrix, but not without a cost. My biggest complaint with XEN is that is a patch to the linux kernel. So unless your distro provides a pre-built xen kernel you might be spending time compiling a custom kernel.

Conclusion: XEN is great for datacenter purposes and the advanced linux user across the board. Distros that include XEN management tools such as SuSE or Fedora.

KVM

The latest entry into the Hypervisor realm for Linux. Introduced into the Mainstream vanilla linux kernel around 2.6.21, KVM is a KLM or kernel loadable module that may be inserted anytime to enable access to the Virtualization Extensions provided by a CPU. KVM was written by Quamranet, later acquired by Red Hat, as an answer to the XEN acquisition by Citrix. KVM is based around the QEMU emulator and the work done in the k-qemu project to merge an open-source virtualization driver into the Linux kernel. Many of the open-source tools that were written to work with xen have been updated to also work with KVM, such as Virt-Manager, Libvirt, Virt-Viewer, oVirt, and several others.  KVM has accelerated drivers known as “virt-io” which provided better access/performance for  block and network devices. KVM is compatible with almost all Linux distributions and most versions of Windows including Windows-7.

I recently tried to switch to using KVM fulltime after I encountered problems with my VMware workstation installation. Running on ArchLinux, I was unable to get the libvirt/virt-manager to work without crashing. So I instead wrote a set of scripts to start the Virtual Machines manually using a terminal window. This was a good experience as I was able to understand more about the command switches of the qemu-kvm commands, the differences in displays (cirrus, vga, vnc) as far as resolutions and emulation are concerned, and the challenges of getting virt-io drivers to install onto Windows-7.  I have found Windows-7 to run very slowly on KVM. This conclusion is based on several different types hardware including workstation class Intel & AMD systems, and several laptops. I also run Virt-Manager on a Linux Mint 8 workstation and have no problems on that distro as far as the stability of the program or GUI is concerned. Linux runs extremely fast inside as a KVM Virtual Machine.

Conclusion: KVM is an excellent hypervisor with lots of potential for the desktop. More improvements in the area of graphics performance, and the desktop tools are needed. Red Hat recently launched the RHEV platform and is sponsoring an opensource project known as Delta Cloud. This commitment from Red Hat to develop KVM and push Virtualization on the server side will certainly lead to vast improvements for server workloads for windows server and linux server platforms.

KDE 4.3.2 vs Gnome 2.28

Oct.27, 2009 in Site Announcements Comments Off

Recently, as I was setting up my new workstation, I was torn between the KDE vs GNOME desktop environment. Sure, I’ve used other WM’s over the years. I’ve always been a big fan of Window Maker, and although I’ve dabbled with XFCE and LXDE over the years, I always preferred the desktop environments.

I think back to when Gnome was still an infant and KDE 2 was by far the best Desktop Environment of the day (circa 1999 – 2002). No matter how many times in recent years I’ve tried to install KDE, and embrace it, something always shy’s me away. I’ve always been attracted to some of KDE’s application integration, such as  Kmail, Akkregator, and Konqueror.   Sure, the latest KDE 4.3.2 has some really nice features and built in effects… but, For the life of me, I can’t get Audio to work correctly. This has always been a recurring theme with KDE over the years… for some reason the sound system queues the sounds and causes delays on sound events. There comes a point when you just dont want to spend any more hours trying to troubleshoot and twak.

In comes Gnome 2.28.  I’ve been using Gnome steadily over the past 4 years, and have never had a major issue with it. This go round, my only complaint is with the GDM Login Manager. Somewhere along the line, GDM has been rewritten and many of the tweakable settings such as Themeable login greeter are missing, but easily fixed by installing and switching to “SLIM” login manager ‘pacman -S slim’ .

Well, goodbye KDE. Try you again around 5.x when you look less like Aero

Review of CyberPowerPC custom Built AMD Workstation

Oct.25, 2009 in Site Announcements Comments Off

I recently decided to release my 24″ iMac to my Wife for her photography work, thus leaving me without a decent workstation. Sure I could fire up that old OS/2 Warp (E-Comstation) machine that is collecting dust somewhere in the basement, but I decided it was time to get a serious Linux workstation (Rather than running off a MacOS VMWare Fusion instance). So as any one would do, a price hunt ensued to find the best deal. Sure, I’ve built machines hundreds of times over my career (desktops & servers), but being a bit out of touch with hardware specs, I decided to but pre-built. In my search on places like NewEgg, Costco, ZipZoomFly, Amazon, and even HP.com, I came across CyberPowerPC. A custom PC builder based out of Cali. I started toying with their Online Custom Configurator (much like one would when shopping for a new car). I was able to select components down to the manufacturer in most cases. they have an excellent selection of Cases, Cooling, Power Supplies, accessories, and so on. In fact, I think I spent about 4 days looking and tweaking the config until I had a pretty good idea of what I thought I wanted. Because of the amount of time you could spend tweaking, they are kind enough to provide a “Save Configuration” button. Now intersetingly enough, this Save button apparently also emails the configuration to an employee at CyberPower, who is nice enough to review your specs for any incompatabilities or conflicts, but also is available to ask any Pre-Sales questions.

Now that my specs were certified in pre-sales, and I took the opportunity to ask some questions, I shopped a few more places and even priced out the same parts at NewEgg for a DIY comparison. I found the price difference to be negligable and appreciated the added comfort of professional builds and company backed warranty. Order Placed!

During the post-sales pricing, the order status page is very detailed and keeps you informed as to which phase your system is in. I was contacted once prior to the assembly by my Sales rep who informed me about a backorder on a component and asked if I wanted an alternate. I took this time to upgrade the video cards as well. Something you probably can’t get at Dell. He indicated he was hoping to get it shipped out by the end of the week. Indeed it was.

Upon arrival, the system was packaged very neat and tight inside the box. The unveling revealed a very well built system overall. There was a minor issue with 2 case fans. One was loose in the chassis and required a minor reseat, the other was not cabled into the fan controller because of the shipping foam used inside the case to prevent shifting. All in all, a very excellent piece of equipment, great service, and lots of cool extras. I highly recommend shopping at CyberPowerPC.com before you go anywhere else.

So you are asking, what OS did you install on it? ArchLinux of course! The system does dual boot Windows-7 as well, strictly for hardware management (firmware flashes) and future gaming. But as of right now, its running KDE 4.3.2 on ArchLinux.

Update on OCZ SSD Drive

Aug.07, 2009 in Site Announcements Comments Off

Its been while since I’ve posted an update to this site. An appropriate post would be an update to the status of the OCZ Solid State drive installed in my 24″ iMac. Overall, I am very impressed with the performance of this drive, but initially encountered some issues with system lockup when trying to wake from sleep. The symptom is that MacOS would goto sleep. If it happened on a screen blank, no big deal; however, when waking up from a deeper sleep mode, I found I was presented with the password prompt, but after entering my password, the system would just hang and never return to a working OS state without an actual power cycle. After trying to tweak out the power saving settings, I settled on turning off all power saving features in MacOS except for the Screen Blank feature. Thus far, I have had no wake-from-sleep issues since.

In addition to this bug, I copied over my VMWare Fusion Virtual Server running ArchLinux from an external driver over to the SSD. The VM not only boots quicker, but performs at least 50% faster than it did on the external FireWire disc.

Server Move

May.24, 2009 in Site Announcements Comments Off

I am in the process of moving the SharkOS server and services around. At this time, the main site and database have been migrated to another provider. The wiki and code repositories are still in progress at this time, and will reside on a secondary system.

OCZ Solid State and MacOS-X on Intel iMac

May.07, 2009 in Site Announcements 3 Comments

The 320GB Western Digital drive that shipped with my iMac recently failed. I decided to replace it with a solid state drive from OCZ. After some research, I purchased the OCZ Apex Sata II 120GB drive from NewEgg. Taking apart a 24″ Intel Imac is certainly no picnic. At the time of purchase, I also ordered an adapter kit from OCZ for  converting 2.5″-> 3.5″. Because of the imac’s unique mounting paltes, the adapter did not fit as I had hoped; but, some strapping tape solved the problem and secured the drive (plus adapter kit) into the chassis. Once installed, I inserted the Leopard installation DVD disc and booted. To my dismay, the drive was not recognized by Disk Utility. There is limited information available on how to perform an SSD upgrade on a iMac, but I found one useful piece of information about the Partition Table format.

After disassembling the computer again, I connected the drive using an external SATA -> USB adapter and attached it to my Thinkpad running ArchLinux. I fired up GParted and discovered the drive was preformatted with an MS-DOS partition table, and an NTFS filesystem. I changed the partition table type to “GPT” aka “GUID” which is what the EFI bios uses in Intel Macs.  Sure enough, the drive was recognized by Disk Utility on the next boot, and the installation went smoothly.

The iMac now boots from the Apple logo to desktop in 12 seconds. The application performance also exceeds my expectations. Later, I’ll be testing VMware Fusion as I rebuild my Arch development environment.

UPDATE:

Please visit one of our subscriber’s websites. He has a site dedicated to SSD on Mac’s

http://www.mac-ssd-drives.com/

« previous entries  
Next Page »
  • RSS OpenTelegard Project

    • Project Status
    • Weekly Update 20100603
    • New Website Features
    • API RDOCS Updated
    • Screenshots 20100516
    • Weekly Status Update 20100513
  • Your Account

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • VOIPo – Unlimited Residential VoIP from $8.25/Mo

  • SiteReport Stats

    Powered By SiteReport.org

© 2003-2008 SharkOS Project - Chris Tusa (sharkoslinux)

Full RSS - Comments RSS

Bad Behavior has blocked 73 access attempts in the last 7 days.