Filed under: Technology | Tagged: Deals, FriendFeed, twitter, Web2.0 | No Comments »
Rails Hello World!
App\Controllers\say_controller.rb
class SayController < ApplicationController
def hello
@time = Time.now
end
def goodbye
end
def files
@files = Dir.glob('*')
end
end
app\views\say\hello.html.erb
<html>
<head>
<title>Hello, Rails!</title>
</head>
<body>
<h1>Hello from Rails!</h1>
<ul>
<li>Addition: <%= 1+2 %> </li>
<li>Concatenation: <%= "cow" + "boy" %> </li>
<li>Time in one hour: <%= 1.hour.from_now %> </li>
</ul>
<% 3.times do %>
Ho!<br />
<% end %>
Merry Christmas!
<br /><br />
<% 3.downto(1) do |count| -%>
<%= count %>...<br />
<% end -%>
Lift off!
<br /><br />
Email: <%= h("The <thekhuc@gmail.com>") %>
<p>
It is now <%= Time.now %>
</p>
<p>
It is now <%= @time %>
</p>
<p>
Time to say
<%= link_to "Goodbye!", :action => "goodbye" %>
</body>
</html>
http://localhost:3000/say/hello
Hello from Rails!
- Addition: 3
- Concatenation: cowboy
- Time in one hour: 2008-10-03 06:23:33 UTC
Ho!
Ho!
Ho!
Merry Christmas!
3…
2…
1…
Lift off!
Email: The <thekhuc@gmail.com>
It is now Fri Oct 03 01:23:33 -0400 2008
It is now Fri Oct 03 01:23:33 -0400 2008
Time to say Goodbye!
app\views\say\goodbye.html.erb
<html> <head> <title>See You Later!</title> </head> <body> <h1>Goodbye!</h1> <p> It was nice having you here. </p> <p> Time to say <%= link_to "Hello!", :action => "hello" %> </body> </html>
http://localhost:3000/say/goodbye
Goodbye!
It was nice having you here.
Time to say Hello!
app\views\say\files.html.erb
<html> <head> <title>Files</title> </head> <body> <ul> <% for file in @files %> <li>file name is <%= file %></li> <% end %> </ul> </body> </html>
http://localhost:3000/say/files
- file name is app
- file name is config
- file name is db
- file name is doc
- file name is lib
- file name is log
- file name is public
- file name is Rakefile
- file name is README
- file name is script
- file name is test
- file name is tmp
- file name is vendor
Filed under: Rails | Tagged: hello world, Rails | No Comments »
Agile Web Development with Rails - Third Edition
This is my current read. I want to see how Rails development is different from ASP.NET and how Rails enables Agile Web Development.
![]() |
Filed under: Agile Development, Books, Rails | No Comments »
NAnt Intellisense in Visual Studio 2005
Kevin Miller has a great tutorial for getting Intellisense working for NAnt under Visual Studio 2005.
Filed under: Build, Continuous Integration, Visual Studio 2005 | No Comments »
AnkhSVN and VS Command Shell
Add the following tools to your toolset if you’re doing doing Continuous Integration with your .NET projects:
AnkhSVN - A Subversion SourceControl Provider for Visual Studio. The software allows you to perform the most common version control operations directly from inside the Microsoft Visual Studio IDE. With AnkhSVN you no longer need to leave your IDE to perform tasks like viewing the status of your source code, updating your Subversion working copy and committing changes. You can even browse your repository and you can plug-in your favorite diff tool.
VS Command Shell - VSCmdShell provides users with a shell window inside the Visual Studio IDE that can be used for Visual Studio commands as well. Current version allows user to use either Windows Command Shell (cmd.exe) or Windows PowerShell.
Filed under: IDE, Open Source, Shell, Source Control, Visual Studio 2005, Visual Studio 2008 | No Comments »
IIS 6 Fix for UrlRewriter.Net
Make sure you add a Wildcard application maps entry under Application Configuration for UrlRewriter.Net to work without file extensions, e.g. http://localhost/show/users.
Filed under: IIS, Microsoft, Tutorials and Tricks | No Comments »
Could Not Load File or Assembly Issue
Problem:
Could not load file or assembly ‘System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. System could not find the file.
Cause:
System.EnterpriseServices.dll is missing in the GAC or there exist different versions of this dll.
Fix:
Drag and drop “<windows_directory>\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll”
into the “<windows_directory>\assembly\” folder.
Filed under: .NET, ASP.NET 2.0 | No Comments »
Projects
These are some of my latest projects, which I take great pride in posting.
Tools used: ASP.NET, C#, ASP.NET AJAX Control Toolkit, Javascript, CSS
Create/Edit New Foods
Grocery List
Eight 8-oz Glasses of Water
Edit Nutrition Goals
Filed under: Work | Tagged: diet, fitness, Work | No Comments »
Development Tools
If you manage a start-up, and can’t afford to pay for software development tools, then these are for you. They are very popular in the open-source community. There is also plenty of help on these tools on the web to help you get started. I am currently using these for my projects as well, and they’re really good.
NUnit
NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current production release, version 2.4, is the fifth major release of this xUnit based unit testing tool for Microsoft .NET. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features, for example custom attributes and other reflection related capabilities. NUnit brings xUnit to all .NET languages.
NAnt
NAnt is a free .NET build tool. In theory it is kind of like make without make’s wrinkles. In practice it’s a lot like Ant. A
TortoiseSVN
Subversion client, implemented as a windows shell extension.
TortoiseSVN is a really easy to use Revision control / version control / source control software for Windows.
Since it’s not an integration for a specific IDE you can use it with whatever development tools you like.
TortoiseSVN is free to use. You don’t need to get a loan or pay a full years salary to use it.
DBVisualizer
DbVisualizer is a database tool useful for developers and database administrators to aid develop and maintain their databases. It is the perfect solution since the same tool can be used on all major operating systems accessing a wide range of databases.
Oracle Database 10g Express Edition
Oracle Database 10g Express Edition (Oracle Database XE) is a free, downloadable version of the world’s most capable relational database.
Oracle Database XE is easy to install and easy to manage. With Oracle Database XE, you use the Database Home Page, an intuitive browser-based interface, to administer the database; create tables, views, and other schema objects; import, export, and view table data; run queries and SQL scripts; and generate reports.
Oracle Database XE includes Oracle HTML DB 2.1, a declarative, graphical development environment for creating database-centric Web applications. In addition to HTML DB 2.1, you can use popular Oracle and third-party languages and tools to develop your Oracle Database XE applications.
Links
http://www.nunit.org/index.php
http://nant.sourceforge.net/
http://tortoisesvn.tigris.org/
http://www.minq.se/products/dbvis/
http://www.oracle.com/technology/software/products/database/xe/index.html
Filed under: Open Source, Oracle, Source Control, Technology, Work | Tagged: .NET, Development, Open Source | No Comments »


















