Practical Web Applications for Daily Living…
ASP.net MVC
Zend Framework First Impression
Aug 16th
Got my 30 minutes dive into the zend framework, installed it in my server and got a little play with layouts (masterpages in asp.net), the Bootstrap (not sure with asp.net mvc what is the equivalent for this one), application.ini (asp.net mvc has this) and some structure overview. Zend framework still has the Movel-View-Controller pattern and like any mvc framework i’ve work with, this pattern is very easy to adopt once you have the mindset, is it a little bit weird it you’ve just dive in from a typical object oriented programming structure… anyway… have to go… raining again with a hungry stomach to feed.
Payroll system Singapore
Aug 12th
We are currently arming for a payroll system which is going to be deployed in Linux servers, my first choice is asp.net mvc but I am not sure if it is supported on the engine that can run asp.net apps to Linux (forgot the name of the engine). So the second choice is PHP, since it is the closest language I am fluent in using next to c#. But building payroll system from scratch is a total pain how much more if I code everything from zero. I have to pick a reliable framework for this. I have a little experience in cakephp and code igniter but I think this frameworks are still babys frameworks, I need a framework that has proven record and is used in enterprise level of applications. Enter Zend framework, used by varien to build there magento ecommerce platform, hmmmm…. so I made my choice, zend.
I downloaded the manual documentation and yep, it is in mvc pattern. So this thing is pretty easier for me.
Now the business analysis part, I am not an accounting Guy, I need to research on how payrolls flow, I really don’t care about this stuffs before.
I will be posting here the codes and scenarios as I move along with this project. Stay tune.
CRM using Php
Jul 12th
One of our clients wants to have a simple CRM type of web application, then want to deploy it in their servers which are all Linux base, I am planning to use php, I would like to use asp.net because I am very comfortable coding with csharp but the server is apache and db is mysql, daymmm….
The Company is an educational institution, they have multiple branches across their country. The company wants to make their clients access to the information about each of thier branches be easy. That is the reason why they want to build this application.
Here are the web applications requirements.
1. The company has multiple branches and each branch has different schedules. Each branch should be able to upload a CSV file to the servers and update the database according to the changes they have made.
2. Customers should be able to filter the result by branch, by events, by level.
3. It should be integrated to thier current CMS base website.
4. Should be daymmm fast…
Sounds easy right????
so here is the approach.
1. create a model to parse .csv files extra the data and update the database
2. create a model to get data from the database
3. create a controller to filter the getData model’s outputs.
sounds easy right????
here are some of my suggestion, but I won’t suggest it anyway to them so that less work more pay… anyway…
1. they should convince the user to login, so that they will know who is using their web app.
2. once they knew the user, they should have existing knowledge about the user, they can get information from sources like facebook, twitter or other social network sites.
(Because of these data, they can be able to interact with the user well).
Technology I would like to use:
1. I would like to use Google’s oauth to authenticate users.
2. I would like to integrate it with App Engine APIs
3. I would like to make use of gmail’s contextual capabilities.
4. I would like to make use of HTML capabilities. (but not too sure, because HTML5 is not yet fully implemented to the currently popular browsers)
5. I would like to package an Android App, for this webapp, and users can be able to download this app, and It will be triggered everytime a new event is updated in their watchlist.
6. and many2x more….
Sounds easy right????
Problem in my side.
1. Loaded with other tiny projects (can be visualized as zergling projects).
2. pre-occupied by personal hobbys with is still also doing programming (BS!!).
Coding in Asp.net MVC
Jul 3rd
Its been more than 6 months now, I haven’t touch anything about C# MVC, I’ve been following asp.net mvc for 5 months, and I had created some web apps in my local drive, I have digested the concept of model-view-controller and transitioning to Zend Framework which is one of my current weapons right now is fast. Right now I have an Idea of a web application system that can give solution to project workflows and I want to deploy it in the cloud. I’ve done some UI design already and we are using it right now, although not automated since I just to the thing first in MS exel, but I want to deploy this system to the cloud because I find out that we have generated a very effective project management system here for project collaboration, even better than basecamp.
Well…. I still have a lot of projects to finish, I am targeting to finish my android game before the year ends, And still I haven’t find any resource that can be my reference on how to optimize java codes to run super fast in the Android Platfrom. The codes that I am using is super basic, and it cannot handle my game requirements, especially for animations.
I am very hungry already… have to go back home ASAP…. !!!!
HTML 5 will kill Flash and SilverLight.
Mar 17th
I’ve just read an article about the coming of ie9 and it is going to embrace html5,
daymmm… Thank god i did’nt dive too much on flash and didn’t even taste how to code in silverlight… the coming of html 5 will eventually eat this two browser plugins for rich internet applications.
Nehhhh… too much information about this… I will still have to dive my self into this magento thing..
If I can create an asp.net mvc application that will replicate how magento works… It will be a lot of fun for me…
Asp.net has updated their Website Layout
Mar 14th
asp.net team has updated their website layout, the design is not that impressive and looks so cheap, man… can’t they find a better designer?
I keep on checking my former beloved platform to see some updates, but it seems like its been left behind already. Or maybe I can create a better user interface for your website guys. Common im just an email away..
I missed coding in Visual Studio.
Mar 13th
For two months now, I’ve been digging my way into the open source arena, php and mysql to be specific. I’ve been a full time asp.net csharp developer for more than two years already but now I am into magento and code igniter using LAMP servers. Even though coding in asp.net is a lot easier compare to developing in php (because of visual stdudio.) I still find being in open source now a days is a lot more practical if you and your clients are in the SME business front. For example, magento. I can’t create a system as powerful as magento for a short period of time even if I use asp.net. Yes there are also e-commerce platforms that uses asp.net like aspdotnetstorefront but it is very expensive and is too hard to customize. I used it to one of my clients before, And it was a pain to my ass tweaking its engine to meet the clients needs. Compared to magento, even a php beginner can customize it. I am not saying that I am leaving asp.net now, I can somehow use my experience of both sides to be more effective in my future projects.
MVC is all about separation of concern
Dec 18th
• Business or domain logic and data storage (model)
• Application logic (controller)
• Presentation logic (view)
Html Table with Drop Down List (View Engine) in row Asp.net MVC / C#
Dec 16th
We are going to have Company and Product tables.
Manipulation of data from database is done using LINQ to SQL
Model:
Product:
public class Product
{
[Column (IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.OnInsert)]
public int ProductID { get; set; }
[Column]public int CompanyID { get; set; }
[Column]public string ProductName { get; set; }
[Column]public string ProductDesc { get; set; }
}
public class Company
{
[Column ( IsPrimaryKey=true, IsDbGenerated=true, AutoSync=AutoSync.OnInsert)]
public int CompanyID { get; set; }
[Column]public string CompanyName { get; set; }
[Column]public decimal CompanyValue { get; set; }
}
We are going to create 2 controllers. a controller for the company table and a controller for the product table
Controller:
public HomeController(ICompanyRepository companyrepository, IProductRepository productrepository)
{
this.companyrepository = companyrepository;
}
public ViewResult Index()
{
return View(companyrepository.Company.ToList());
}
product controller
public ProductController(IProductRepository productRepository)
{
this.productRepository = productRepository;
}
public ViewResult Index(int cid)
{
ViewData["products"] = new SelectList(productRepository.Product.Where(x => x.CompanyID == cid), "ProductID", "ProductName");
return View();
}
then we are going to create a strongly typed view for the company and a partial view for the drop down list for product,
View:
<table>
<% foreach (var i in Model) { %>
<tr>
<td> <%= i.CompanyName %> </td>
<td> <% Html.RenderAction("index", "Product", new { cid = i.CompanyID }); %> </td>
</tr>
<% } %>
</table>
partial view for product
Asp.net MVC drop down list, how to display, select, and submit…
Dec 16th
Domain Model:
[Table (Name="bankTABLE")]
public class Bank
{
[Column ( IsPrimaryKey=true, IsDbGenerated=true, AutoSync= AutoSync.OnInsert)]
public int bankID { get; set; }
[Column]public string bankNAME { get; set; }
[Column]public decimal bankVALUE { get; set; }
}
————————- Abstract Division ——————————–
public interface IBankRepository
{
IQueryable<Bank> Banks { get; }
}
————————- Concrete Division ——————————–
public class SqlBankRepository : IBankRepository
{
private Table<Bank> bankTable;
public SqlBankRepository(string connectionString)
{
this.bankTable = (new DataContext(connectionString)).GetTable<Bank>();
}
public IQueryable<Bank> Banks
{
get{ return bankTable; }
}
}
Controller:
public HomeController(IBankRepository bankrepository)
{
this.bankrepository = bankrepository;
}
[AcceptVerbs(HttpVerbs.Get)]
public ViewResult Index()
{
this.ViewData["categories"] = new SelectList(bankrepository.Banks.ToList(), "bankNAME", "bankNAME");
return View();
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string bank)
{
return RedirectToAction("Result", "Home", new { bank = bank.ToString() });
}
View:
<%= Html.DropDownList("bank", (IEnumerable<SelectListItem>)ViewData["categories"])%>
<input type="submit" value="Save" />
<% } %>
Dont’t forget to thank julius bacosa : asp.net mvc web developer philippines
