Categories
WinForms

C# MVP Links

http://www.codeproject.com/Articles/522809/WinForms-MVP-An-MVP-Framework-for-WinForms

http://www.codeproject.com/Articles/563809/UIplusDesignplusUsingplusModel-View-Presenter

http://www.codeproject.com/Articles/42967/Model-View-Presenter-via-NET

http://www.codeproject.com/Articles/31210/Model-View-Presenter

Categories
Mac Web Development

How to set up virtual hosts in the MAMP environment

http://danilo.ariadoss.com/how-to-setup-virtual-hosts-mamp-environment/

Categories
Linux Web Development

Setup PhpStorm to run on OpenSUSE

The problem is that PhpStorm won’t work with the open java openjdk. So you have to install also:

java-1.6.0-sun
java-1.6.0-sun-devel

and not only this. Also you need to add to the .bashrc file in your home directory the following:

#set java paths so PhpStorm can run 
JDK_HOME=/usr/lib/jvm/java-1.6.0-sun 
export JDK_HOME>

Again – it’s for OpenSUSE. On other Linux distributions, the paths may vary.

Categories
Zend Framework

Add custom, xml defined routing in Zend Framework

Sometimes, in Zend Framework, you need to add custom routes in your web application. One of the options is to define the routes in a XML file and load it from the bootstrap.

The advantage of this approach for routing is that you add your routes in the XML file, without the need to touch the PHP code, which makes it very easy for the web app itself to generate or update the routes. This is very useful when when you building a CMS or some SEO related functionality, because you can allow the customer to set their own worded urls according to their SEO optimization strategies.

Categories
Linux

Mercurial error: Not trusting file .hg/hgrc from untrusted user root, group root

I got this error when creating a Mercurial repository on a newly installed Ubuntu server.

The problem turned out that Mercurial will not use the settings in the .hg/hgrc file from a repository if it doesn’t belong to a trusted user or to a trusted group, as various hgrc features allow arbitrary commands to be run.

The solution is to first check what configs file Mercurial trusts and reads:

and find a config file where to put the trust options. For example, I got the following config files listed:

And I chose /home/myusername/.hgrc, which was not existing, so I created it and wrote the following option:

Categories
Linux Web Development

Mercurial shell commands

Switch branches in Mercurial

Careful!!! It discards local changes!
More about branches in Mercurial: http://mercurial.selenic.com/wiki/NamedBranches

Categories
Linux Web Development

My vimrc custom settings

Categories
Linux Web Development

How To Use Amazon EC2 as Your Desktop

How to use a Linux VM from EC2 as a development machine which costs about $25 if you use it only for the work day and stop it after that.

The connect to the EC2 VM is via FreeNX software which works like Remote Desktop for Windows machines and manages the network latency which reduces the lag.

http://blog.restbackup.com/how-to-use-amazon-ec2-as-your-desktop

Categories
Ruby on Rails Web Development

To Ruby or not to Ruby (on Rails), that’s the question

I’m writing this post as a backup for my current research on Ruby on Rails tandem.

As it seems, Ruby is a more mature OO programming language than PHP. It allows more flexible, human-closer constructions, like for example: 5.minutes + 10.hours

The Ruby seasoned developers describe coding in Ruby as a real fun, I suppose, because of the more human-closer constructions and pure OO approach. In addition to this comes the Rails framework, which utilizes the advantages of Ruby and this results in a really power platform for developing web applications, allowing a great increase of productivity (and fun, while producing 😉 ).

I was very attracted to learning and using RoR after the research, but as it seems, the learning curve takes not exactly little time. And having few projects on the top, plus still learning Zend Framework – it would be a hard burden to carry at once.

However, it seems as a nice investment in technology as it has a lot of potential and there will be open jobs for RoR development rising for the next few years. So, I’m currently not able to dedicate a lot of time in learning RoR, but I would probably do it the near future. I will probably also play with it meanwhile, when there is free time.

Below are the resources I found most informative, while researching for the current topic.

Pro RoR:
http://flnotes.wordpress.com/2008/02/18/should-one-learn-ruby-on-rails/
http://rewrite.rickbradley.com/pages/moving_to_rails/
http://www.buildingwebapps.com/articles/79208-the-rebuilding-and-scaling-of-yellowpages-com
http://www.smashingmagazine.com/2010/10/26/successful-freelancing-with-ruby-on-rails-workflow-techniques-and-tools/

Pro Zend Framework:
http://www.marksanborn.net/php/why-i-use-the-zend-framework/
(Single but enough for me and reflecting exactly my current point of view)

Categories
Ruby on Rails

How to install Ruby 1.9.2 and Rails 3.0 on Ubuntu 10.10

Here is the text version of the tut:
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you

it is more detailed.

And here is the video tutorial, based on the text version:
http://www.youtube.com/watch?v=NmWYZVUln4E

To use mysql2, first need to install the libmysqlclient16-dev package:

[ruby]sudo aptitude install libmysqlclient16-dev[/ruby]

and then:

IF there are problems installing mysql2, here are the steps to try to solve it:

>gem install mysql — –with-mysql-config=/usr/bin/mysql_config

But you need to find the correct path fo mysql_config:

After that try again:

Also make sure you have the mysql2 set in the project’s Gemfile:

[ruby]gem ‘mysql2′[/ruby]

Also, the password in database.yml should be surrounded by “”
If you get an error that rake can’t connect to /tmp/mysql.sock try to comment this line in the database.yml:

[ruby]socket: /tmp/mysql.sock[/ruby]