I am a Web Developer and this is my blog on Web Development. Read it.
Friday, July 13, 2012
The Service Layer: How I understand it
There are several articles and posts out there regarding what a Service Layer is. I'm going to throw my two cents in as to what my interpretation of the Service Layer is.
Whenever I am in conversations with other devs or giving presentations about the Service Layer, I convey the following points:
A Service Class is primarily “just another object”.
When I had first started reading up on this my mind was flooded with several definitions which are all true and “click” after you understand what the Service Layer actually does. Start off thinking of a Service Classes as a normal
Whenever I am in conversations with other devs or giving presentations about the Service Layer, I convey the following points:
A Service Class is primarily “just another object”.
When I had first started reading up on this my mind was flooded with several definitions which are all true and “click” after you understand what the Service Layer actually does. Start off thinking of a Service Classes as a normal
Wednesday, July 11, 2012
The Service Layer Series
It's been a while since I've posted, but this is not going to be about this topic today. This blog has been the one constant in my development career from when I could sink my teeth in enough into it to be good enough according to my intrinsic metrics to have an opinion (and think it matters) and I intend to keep it going.
As with any autodidactic programmer, I may mix up some concepts. To be quite honest, the more and more I use the Service Layer, the more it looks like an actual extension of the Model Layer than an actual layer that exists in between the model and it's clients.
As
As with any autodidactic programmer, I may mix up some concepts. To be quite honest, the more and more I use the Service Layer, the more it looks like an actual extension of the Model Layer than an actual layer that exists in between the model and it's clients.
As
Sunday, November 13, 2011
How to watch a log file in realtime in Ubuntu Linux
There are times when I'm debugging code on a linux box that I want to see what's being logged by a Web Site or Web Application. What I used to have to do was do something on the website, then open up a terminal in Ubuntu (or any other linux distro for that matter) and view the logfile with either vim, nano, cat | less or gvim.
How I used text editors to do it
I use VIM as my default text editor on Ubuntu or any other linux distros (such as redhat, centos, debian, linux mint) that I work on.
A few weeks from now I used to use vim to open the log file, then the :e (edit) command to
How I used text editors to do it
I use VIM as my default text editor on Ubuntu or any other linux distros (such as redhat, centos, debian, linux mint) that I work on.
A few weeks from now I used to use vim to open the log file, then the :e (edit) command to
Monday, January 3, 2011
How to fix phpmyadmin error: "Connection for controluser as defined in your configuration failed"
"Connection for controluser as defined in your configuration failed" It's one of those small, annoying messages that appear out of the way on your screen, but still catches your eye once in a while especially when you're deep in thought about how to building a multi-join query in the SQL tab of phpmyadmin.
Well, it annoyed me today so much that I finally decided to do something about it and finally take a look. I opened up the PHPMyAdmin config file located at /etc/phpmyadmin/config-db.php on Ubuntu Maverick Meerkat. There's a default username and password in $dbuser and $dbpass
Well, it annoyed me today so much that I finally decided to do something about it and finally take a look. I opened up the PHPMyAdmin config file located at /etc/phpmyadmin/config-db.php on Ubuntu Maverick Meerkat. There's a default username and password in $dbuser and $dbpass
Fix "Connection for controluser as defined in your configuration failed" in PHPMyAdmin on Ubuntu.
Thursday, December 16, 2010
ContentPane in dojo not loading scripts? This is how you fix it.
I was planning on writing my first enquiry on how to do something in dojo, but just before I pressed the submit button, I thought I'd look into one more thing and as the saying goes - "it's always in the last place you look" (probably because you stop looking after you find whatever it is you're looking for).
So the problem I had was that I wanted to load a datagrid inside a contentPane in a pet project my newbie friends and I are using to sharpen our Zend Framework skillz.
I've been idle (and will continue to be for the rest of the year) so all my tickets are pretty much at a stand
So the problem I had was that I wanted to load a datagrid inside a contentPane in a pet project my newbie friends and I are using to sharpen our Zend Framework skillz.
I've been idle (and will continue to be for the rest of the year) so all my tickets are pretty much at a stand
ContentPane in dojo not loading scripts or dijits in zend framework
Friday, December 10, 2010
Happy Holidays everyone -- Winding down to hiatus mode.
Well, as fast as my wheels were turning for the past few weeks, I've decided to slow down for the holiday season and spend some time with the family.
To me, there is nothing better than _quality_ time with family - big emphasis on "quality" because when I'm in work mode, I'm always half thinking about work even when I'm sitting on the couch watching TV.
For me, now is the time to not think about work and spend time with, and think about what I'm really working for. This is also a good time to reflect on my goals for next year.
On a final note for 2010, I'd like to wish you all a Merry
To me, there is nothing better than _quality_ time with family - big emphasis on "quality" because when I'm in work mode, I'm always half thinking about work even when I'm sitting on the couch watching TV.
For me, now is the time to not think about work and spend time with, and think about what I'm really working for. This is also a good time to reflect on my goals for next year.
On a final note for 2010, I'd like to wish you all a Merry
Saturday, December 4, 2010
Analysis Paralysis: In a quest for perfection, I manage to achieve nothing
This was supposed to be a live coding note, but it just turned into something else. No ground breaking news, no new concept which will make you go "hmmm", just a guy kicking himself - you can safely ignore this frustrated post if you aren't in the mood to read about how much an idiot I think I am :P
It's been a mixture of Tunnel Vision, NIH Syndrom and Analysis paralysis that had me living in a haze of trying to implement DataMappers ala Zend Quickstart Guide on and off, for the past 4 weeks.
I even wrote the Unit Tests and everything for this project I've taken part in called
It's been a mixture of Tunnel Vision, NIH Syndrom and Analysis paralysis that had me living in a haze of trying to implement DataMappers ala Zend Quickstart Guide on and off, for the past 4 weeks.
I even wrote the Unit Tests and everything for this project I've taken part in called
I found ZF doctrine provider at the end of Analysis Paralysis
Tuesday, November 30, 2010
Unit testing with Live Databases and/or How do I use Mock Objects?
This is another live coding note. I've found my rhythm with TDD and currently bashing away at some unit tests for the Models and Service layers for a project I'm working on.
In tonights post, I'm going to write about how I get around with Unit Testing live databases.
Unit Testing with Live Databases
For my unit tests, I'm currently working with a live test database since I don't fully understand the "power" of mock objects. If you have any links out there that's worth noting, please be a friend and "link me". I'm not going to pretend that I know everything and anything about Web
In tonights post, I'm going to write about how I get around with Unit Testing live databases.
Unit Testing with Live Databases
For my unit tests, I'm currently working with a live test database since I don't fully understand the "power" of mock objects. If you have any links out there that's worth noting, please be a friend and "link me". I'm not going to pretend that I know everything and anything about Web
Unit testing with Live Databases and/or How do I use Mock Objects?
This is another live coding note. I've found my rhythm with TDD and currently bashing away at some unit tests for the Models and Service layers for a project I'm working on.
In tonights post, I'm going to write about how I get around with Unit Testing live databases.
Unit Testing with Live Databases
For my unit tests, I'm currently working with a live test database since I don't fully understand the "power" of mock objects. If you have any links out there that's worth noting, please be a friend and "link me". I'm not going to pretend that I know everything and anything about Web
In tonights post, I'm going to write about how I get around with Unit Testing live databases.
Unit Testing with Live Databases
For my unit tests, I'm currently working with a live test database since I don't fully understand the "power" of mock objects. If you have any links out there that's worth noting, please be a friend and "link me". I'm not going to pretend that I know everything and anything about Web
Saturday, November 27, 2010
How to Get Gigabit Speeds from RTL8111/8168B PCI Express Gigabit Ethernet controller on Ubuntu Linux
Do a quick lspci. Now do you see: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02) for your Ethernet controller?
If so and your network connection information is reporting that your speed is 100 Mb/s rather than 1000 Mb/s, then you MIGHT be using the r8619 driver rather than the CORRECT r8168!
This is what I experienced when I had recently hooked my network up at home. I bought a ReadyNas Duo and updated my network switches to gigabit speeds with two D-Link Gigabit switches.
The expected Gigabit speeds 30 - 40 MB/s did not come. Instead I
If so and your network connection information is reporting that your speed is 100 Mb/s rather than 1000 Mb/s, then you MIGHT be using the r8619 driver rather than the CORRECT r8168!
This is what I experienced when I had recently hooked my network up at home. I bought a ReadyNas Duo and updated my network switches to gigabit speeds with two D-Link Gigabit switches.
The expected Gigabit speeds 30 - 40 MB/s did not come. Instead I
How I refactored my Service Class to be "Separation of Concerns" Compliant.
I'm developing this web application where a users actions is logged at certain places. I initially wrote the logging features into the Main Users Service. I'm currently looking at it now and will be refactoring out the functionality to separate concerns. While to me, at the time, logging a Users action is from a natural standpoint looked like it belonged to the Users service, a more thorough look at it made it clear that the Logging functionality should be it's own Service.
Don't see where the mix up of concerns is?
Here's a list of functionality my Users Service class
Don't see where the mix up of concerns is?
Here's a list of functionality my Users Service class
Dojo's IndirectSelection plugin for the Enhanced Datagrid is deceptively unuseful.
One of the requirements for a project I'm working on is the ability to send emails to selected rows in the datagid. I thought no problem, the IndirectSelection plugin of the EnhancedGrid should be able to handle that semantically! Reading the API and when I initially tried it out I saw the neat little checkboxes as the first column. "Phoar! Checkboxes!" I swear those CBs had a glow around it and I could hear a choir singing in the background ("haaaaaaaaaaaaaa, easy fix for a requiremeeeeeeeeeeennnnnnnnnnnnnnt").
Then I tried submitting with a bunch of rows selected. It was then clear to me
Then I tried submitting with a bunch of rows selected. It was then clear to me
Ubuntu CD Burning: Brassero is OUT; GnomeBaker is IN
I am using Ubuntu 10.10 Maverick Meerkat as my desktop OS and enjoying all the wonderful stability and great hardware support that has been steadily built by the Ubuntu Development team and Linux in general up to this point.
So when I tried to burn a Data CD of pictures to give to give to one of my colleagues who was on his way out, I was irritated by Brassero's buggyness. Brassero, the default burning program used in Ubuntu 10.10 (perhaps other distributions before) was good before. I don't know why all of a sudden it would burn the entire CD and then report in the end that it could not
So when I tried to burn a Data CD of pictures to give to give to one of my colleagues who was on his way out, I was irritated by Brassero's buggyness. Brassero, the default burning program used in Ubuntu 10.10 (perhaps other distributions before) was good before. I don't know why all of a sudden it would burn the entire CD and then report in the end that it could not
To copy and paste or not to copy and paste; adventures in unit testing
Yesterday evening. I started my next coding session. I contemplated the validity of copying and pasting unit tests that have similar functionality, but for totally different domains.
I have developed Service classes for a certain module and I can see this functionality the application of this functionality being similar accross the board. Functionality such as CRUD, Search and Search Result Count etc.
The only things that will be different would be the models it uses which will subsequently be using different DB Tables, but yeah... practically the same methods.
I'll sit on this for a
I have developed Service classes for a certain module and I can see this functionality the application of this functionality being similar accross the board. Functionality such as CRUD, Search and Search Result Count etc.
The only things that will be different would be the models it uses which will subsequently be using different DB Tables, but yeah... practically the same methods.
I'll sit on this for a
New Category: Live Coding Notes
Ok, I know, I've been slack.. It's been several months since my last post and that last one was a tip on how to fix gnome keyring. Now based on how I've been on twitter and lack of activity on this blog, I guess you could say that I've not been doing anything at all or doing too much.
Well, it's a mixture of both really, I really, _really_ want to make a post, but then become too busy. Once I've finished what I was doing (after several days), I just want to not do anything.
Anyway, those days are no more, I'm creating a new category called "Live coding notes" and it will be notes that
Well, it's a mixture of both really, I really, _really_ want to make a post, but then become too busy. Once I've finished what I was doing (after several days), I just want to not do anything.
Anyway, those days are no more, I'm creating a new category called "Live coding notes" and it will be notes that
Fixing Gnome keyring / Login Keyring: "Enter Password to Unlock" issue
Hi everyone, this is just a quick how-to on handling the Ubuntu Maverick/Gnome Login Keyring issue which occurs when you change your user password.
The issue: You've decided to change your password for whatever reason and suddenly you're presented with the following message whenever you launch an application you have instructed to "remember" your password.
Enter password to unlock your login keyring
The password you use to log in to your computer no longer matches that of your login keyring.
This is how you fix it:
Step 1: Go to System >> Preferences >> Passwords
The issue: You've decided to change your password for whatever reason and suddenly you're presented with the following message whenever you launch an application you have instructed to "remember" your password.
Enter password to unlock your login keyring
The password you use to log in to your computer no longer matches that of your login keyring.
This is how you fix it:
Step 1: Go to System >> Preferences >> Passwords
Setting TTY / Virtual Consoles resolution with Grub 2 in Ubuntu Lucid Lynx
I've been using Ubuntu for a while now and something that bugged me a lot was the crappy screen resolution whenever I had to go and use my virtual terminals (TTY).
In previous versions of ubuntu which used grub 1, setting up the resolution for tty was done by simply using the vga=??? boot option. In grub 2 however, this is not so easy.
I remember when it first came out. I was somewhat exasperated by the fact that I had _just_ become comfortable f*cking with grub's menu.lst and now I had to learn how to use grub 2 - which had some new convention for editing menu items let alone setting
In previous versions of ubuntu which used grub 1, setting up the resolution for tty was done by simply using the vga=??? boot option. In grub 2 however, this is not so easy.
I remember when it first came out. I was somewhat exasperated by the fact that I had _just_ become comfortable f*cking with grub's menu.lst and now I had to learn how to use grub 2 - which had some new convention for editing menu items let alone setting
Friday, November 26, 2010
Just when I needed it the most, my weapon of rapid web development goes nuts!
Today was an absolute sh*t fight. Starting from an entire morning where after I experienced several crashes with Visual Studio Express, that I thought I'd try the full version.
To do this though, I had to expand my VMWare virtual disk. So a quick:
vmware-vdiskmanager -x 45GB windevxp.vmdk
... and my virtual disk is now 45GBs! - I then had to resize the windows partition. I'll post more on this straight after this post.
So with that done, I'm set to install Visual Studio, I thought yeah it should take about 5 - 10 miuntes...
BOY WAS I WRONG!
The installation took like 2 - 3
To do this though, I had to expand my VMWare virtual disk. So a quick:
vmware-vdiskmanager -x 45GB windevxp.vmdk
... and my virtual disk is now 45GBs! - I then had to resize the windows partition. I'll post more on this straight after this post.
So with that done, I'm set to install Visual Studio, I thought yeah it should take about 5 - 10 miuntes...
BOY WAS I WRONG!
The installation took like 2 - 3
Subscribe to:
Posts (Atom)