Tuesday, December 30, 2008
Must see JQuery Example - amazing
at 10:54 PM 0 comments Posted by roni schuetz
Labels: links
Sunday, December 28, 2008
ASP.NET MVC Linklist
- http://blog.wekeroad.com/
- Exploring System.Web.Routing
- Setting up authentication in asp.net MVC
- Using System.Web.Abstractions in Your WebForms Apps
- ASP.NET MVC Request Flow
- Hierarchical Treeview with ASP.NET MVC & jQuery
- ASP.NET MVC Tip #1 - Accessing TempData from a ViewUserControl
- ASP.NET MVC Tip #2 - Redirecting to another action and passing information to it
- ASP.NET MVC Tip # 3 - Getting an Absolute Url Using an Extension Method
- ASP.NET MVC Tip #4 - Handling Multiple Form Actions on One View
- ASP.NET MVC Tip #5 - Submitting an AJAX Form with jQuery
- ASP.NET MVC Tip #6 - Code Snippets for Quickly Testing Routes
- ASP.NET MVC Tip # 7 - Using a CAPTCHA with MVC (http://www.coderjournal.com/2008/03/aspnet-mvc-captcha/)
- Using the ComponentController in ASP.NET MVC CTP 2
- Fluent Filters, IQueryable and Linq To Sql for Easy Data Access
- HowTo: ASP.NET Chart Controls mit ASP.NET MVC nutzen
- HowTo: ASP.NET MVC Projekt erstellen (erster Einstieg)
- HowTo: ASP.NET MVC - Was ist es und warum sollte man es sich anschauen?
- LINQ to MSI - Part 0 - Introduction
- Linq to SQL Wish List
- # 7 - (re)Creating your DB with Linq’s DataContext for testing
- TDD Tips: Test Naming Conventions & Guidelines
- # 8 - Introduction to Mocking with Moq
- 3 mistakes to avoid when using jQuery with ASP.NET AJAX
- Implementing the Repository Pattern with Linq-to-Sql
- Mocking LINQ to SQL DataContext
- Code Generation Tool (SqlMetal.exe)
- More In LINQ to SQL with the Repository Pattern
- LINQ to SQL - Implementing the Repository pattern
- Getting Expressive: Digging deep into Expression Trees Part 1
- Getting Expressive: Digging Deep into Expression Trees Part 2
- Linq to SQL DataContext Lifetime Management
- Business Object wrapper around LINQ to SQL
- Visual WebGui and a LINQ to SQL quirk
- LINQ and Entity Framework Posts for 2/4/2008+
at 10:42 AM 0 comments Posted by roni schuetz
Justin Etheredge: How To Guarantee That Your Software Will Suck
Justin Etheredge wrote an article: How To Guarantee That Your Software Will Suck
here is an overview:
1) Don't give your developers the tools they need to do their jobs.
2) Just jump right in, plans are for chumps.
3) Set strict deadlines on projects that will take "tens of thousands of man hours".
4) Spend hundreds of hours writing ridiculously detailed documentation.
5) Refuse to buy them more than one monitor.
6) Buy cheap hardware.
7) Keep asking them to multi-task.
8) Write everything yourself.
9) Expect your developers to sit quietly in front of their computer 8 hours a day.
10) Purchase tools without consulting those who will have to use them.
some of the points i absolutely agree with :-)
at 10:41 AM 0 comments Posted by roni schuetz
Labels: agile project, definition, development, general, project management, project principles
Sunday, December 21, 2008
Visual Studio Team System 2008 Team Foundation Server Power Tools Explorer Extensions
I'm not a 100% sure but I think this is getting installed with Visual Studio Team System 2008 Team Foundation Server Power Tools:
Especially I like the comparsion with workspace version :-)
at 4:35 PM 0 comments Posted by roni schuetz
Labels: tfs, tfs power tools extension
TFS - Customizing Process Template's - especially iterations!
I don't know how much hours I spent over the last few day's with TFS (Team Foundation Server) and the configuration around it. I can't understand why Microsoft is making this so hard while alternative products of Microsoft are easy for installation and handling (e.g. Visual Studio / SQL Server / any many more.....)
Let's talk about customizing TFS process templates. You don't need to but I strongly suggest you download the "Visual Studio Team System 2008 Team Foundation Server Power Tools". Once you have installed Visual Studio 2008 Team Foundation Server Power Tools you have a additional menu items below Tools->Process Editor.
Before you launch this you will have to download one of the provided Process Templates:
- MSF for Agile Software Development - v.4.2
- MSF for CMMI Process Improvement - v.4.2
To download a Process Templates you will have to choose from the menu: Template Process Manager
Choose your location on your drive and select "Save".The output will saved as the following Print Screen display:
Now you can go back to your Visual Studio Menu and select: Tools->Process Editor
and select the File ProcessTemplate.xml on your disc.
You gone be surprised what you gone see !!!! At least I was it.
As long as you don't change anything within the iterations it should work when you make your changes save the file and upload it again over the Process Template Manager. But in case you are doing CHANGES AT ITERATIONS you gone face problems upon creating task when you try to add a new TFS Project Wizards.
The error you gone see in your TeamProjectCreation log file looks like this:
---begin Exception entry---
Time: 2008-12-21 14:09:12ZModule: Work Item TrackingEvent Description: TF26214: Cannot save the work item. Fields with errors: Iteration Path;IterationIDException Type: Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationExceptionException Message: TF26202: Iteration Path is not a valid area or iteration path. In the Team menu, click Team Project Settings, and then click Areas and Iterations to review the valid area and iteration paths.Stack Trace: at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.PreValidate() at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.PreBatchSave() at Microsoft.TeamFoundation.WorkItemTracking.Client.BatchSaveHelper.BatchSave(WorkItem[] items)
--- end Exception entry ---
How do you handle this.
- Close your Process Template Manager
- Navigate to your Location on the disc where you have saved your Process Template and from there you navigate to the folder: Work Item Tracking
- Open the file: workitems.xml
- Now you have to replace all "$$PROJECTNAME$$\Iteration 0" with the iteration you have created, in my case it is:
- Upload and overwrite your Custom Process Template and you will be able to create your new project.
I hope VSTS is going to put a lot of efforts to make all this stuff much easier!
at 2:15 PM 0 comments Posted by roni schuetz
Labels: customizing, tfs, tools
XHTML & List of HTML/CSS Services
Some links around XHTML / CSS Services on the web:
- http://snook.ca/archives/html_and_css/html_css_services/
- http://www.snook.ca/archives/html_and_css/commoditization_of_html/.
- http://www.mostsliced.com/
Prices are between 150 USD up to 700 USD
at 12:35 PM 0 comments Posted by roni schuetz
Friday, December 19, 2008
TFS, Reporting Server & Sharepoint
I have spoken over the last few weeks with a lot of people about Team Foundation Server / Reporting Services and Sharepoint WSS 3.0.
Microsoft have tried to do all efforts to create a very detailed installation help how to install TFS in all various modes but my personal conclusion is if I see how much people are running around the forums - why the hell they are not able to make one simple Next -> Next installer which will at least cover the basic mode and one for the distributed mode.
If you think how much hours the industry have spent on installing TFS and how much money this cost then it would make sense to me.
The next thing which I don't really like about TFS is the underdevelopment of maintenance tools. You have to grab everything together and more then that with all the hours TFS group people spending on the forums they could create amazing administration tools which would make much easier to the industry.
What are my expectations? Well I work daily hours over hours with Visual Studio and SQL Server Management Studio, why they make those fancy and amazing Tools but they are not able to manage it to develop such a tool within TFS - sad!
I life like the rest of the community in the hope that they gone invest for the next version some time for that stuff.
at 6:58 PM 2 comments Posted by roni schuetz
Labels: tfs
Wednesday, December 17, 2008
TFS, Reporting Server & Sharepoint
Does your interface complain about IReportViewerMessage? I searched whole-over my web.config files to identify and finally I found it in my Sharepoint Server web.config file: The bad thing is: Since 3 day's i haven't experienced any difficulties with this solution but who knows when it ill come.
I didn't do much else then to comment this line and tried to run it again. Ohh good, the good thing is:
at 9:12 AM 0 comments Posted by roni schuetz
Labels: reporting server, tfs
MSBuild and MVC - does not work?
at 8:54 AM 0 comments Posted by roni schuetz
Labels: agile project, asp.net, mvc, tfs
Thursday, December 11, 2008
Easly reading RSS Feeds or ATOM Feeds with System.ServiceModel.Syndication in C# with .net 3.0
Less code lines are almoast not possible! But one leak is available; the load method always download the full items and there is no option only to download item headers.
The formatted version is also available at my website: http://www.ronischuetz.com/code/reading_rss_atom_feeds.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Xml.Linq;
using System.IO;
using System.Net;
using System.ServiceModel.Syndication;
using System.Xml;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
DateTime start = DateTime.Now;
List<string> urls = new List<string>();
urls.Add("http://feedproxy.google.com/RoniSchuetz");
urls.Add("http://www.tagesanzeiger.ch/rss.html");
foreach (var item in urls)
{
Console.WriteLine(item);
Reader(item);
}
TimeSpan d = DateTime.Now - start;
Console.WriteLine(d.TotalMilliseconds);
Console.ReadLine();
}
private static int counter = 0;
private static void Reader(string url)
{
SyndicationFeed blogFeed = null;
try
{
// Read the feed using an XmlReader
using (XmlReader reader = XmlReader.Create(url))
{
// Load the feed into a SyndicationFeed
blogFeed = SyndicationFeed.Load(reader);
}
}
catch (Exception ex)
{
if (ex is WebException ex is XmlException)
{
// Handle bad url, timeout or xml error here.
Console.WriteLine("Handle bad url, timeout or xml error here: " + ex.Message);
}
else
Console.WriteLine("second case: " + ex.Message);
}
// Use the feed
foreach (SyndicationItem item in blogFeed.Items)
{
Console.WriteLine((++counter) + " " + item.Title.Text);
}
}
}
}
at 2:07 PM 0 comments Posted by roni schuetz
Labels: .net, asp.net, C#, code sample
Monday, December 01, 2008
Intersting approach: Protecting images on the net
It is disheartening to read how images shown on the internet can be taken and used by others. Is there a way of displaying images so that they cannot be downloaded?
Checkout the following link for more information: http://www.guardian.co.uk/technology/askjack/2008/nov/27/protecting-photos
at 8:48 AM 0 comments Posted by roni schuetz
Labels: protect images
Getting Started with the ASP.NET 3.5 Chart Control
The new Chart control can generate charts without a lot of work on your partDan Wahlin (Microsoft Most Valuable Professional for ASP.NET and XML Web Services) is a .NET development instructor and architecture consultant at Interface Technical Training. Dan founded the XML for ASP.NET Developers site, which focuses on using ASP.NET, XML, Silverlight, AJAX, and Web Services on .NET and runs smartwebcontrols.com. Dan has co-authored/authored several different books on .NET, including ASP.NET 2.0 MVP Hacks, Professional ASP.NET AJAX, XML for ASP.NET Developers and is currently working on a new book on Silverlight 2. Dan blogs at http://weblogs.asp.net/dwahlin.
checkout the following link for more info: http://www.ddj.com/windows/212200721
Sunday, November 09, 2008
WebMonitor - simple and free
The main purpose of the WebMonitor application, is to be able to have an easy and simpel way to monitor your server/host through HTTP. You run the application from your desktop and get notifications if on of you monitors act abnormal. This can mean a ruled has failed, ex. you have set the monitor of CodePlex.com to have an MaxResponse time to 500 ms. If the reponse time exceeds this value, an balloonTip will show you that something is up.
http://www.codeplex.com/WebMonitor
at 12:29 PM 0 comments Posted by roni schuetz
Labels: monitoring, server
Monday, November 03, 2008
Live Services - Live Framework
The Live Framework is the uniform way for programming Live Services from a variety of platforms, programming languages, applications and devices. Consume and combine Live Services to build applications that span across digital devices and the web.
Learn more and understand the benefits of programming Live Services with the Live Framework.
Its available here: http://dev.live.com/liveframework/
at 8:46 AM 0 comments Posted by roni schuetz
Saturday, November 01, 2008
Using Panel.DefaultButton property with LinkButton control in ASP.NET
ASP.NET has great limitation — only one server form on the page. Even if you are developing complex page, which looks like several forms with different submit buttons, in fact you have only one form. So we have a problem: How browser understanding which button should be triggered when user pressed ENTER? It uses first Button control (usually that’s wrong), and if you have LinkButton’s, they would never be triggered. In ASP.NET 2.0 new property has been added to the Panel and HtmlForm controls — DefaultButton, which can be used to specify ID of the control, which implements IButtonControl interface (usually Button and LinkButton). This button control would be triggered when user pressed ENTER. But there is one big problem exist: LinkButton control would not be triggered in Firefox on ENTER. In this article I will show why this problem take place and how to solve.
Read the solution at Dmytro's Blog: Using Panel.DefaultButton property with LinkButton control in ASP.NET
at 1:18 PM 0 comments Posted by roni schuetz
Thursday, October 30, 2008
.NET Reflector 5.0
Reflector is a class browser for .NET components. It allows browsing and searching the meta data, IL instructions, resources and XML documentation stored in a .NET assembly. Reflector was first released in October 2000 running on .NET Framework 1.0 Beta.
LINQ and .NET Framework 3.5: Reflector supports query expressions and other concepts introduced in C# 3.5. To enable this feature select “.NET 3.5″ under View, Options, Disassembler, Optimization.
.NET Framework compatibility: Reflector runs on all versions of the .NET Framework using its own assembly loading infrastructure which does not rely on the Reflection API. For example, Reflector can load .NET Framework 2.0 assemblies without having the .NET Framework 2.0 installed.
Assembly Lists: When launched for the first time, Reflector allows you to choose a default set of assemblies. The list of assemblies is then stored in the Reflector.cfg file and will be loaded next time you open the program. Reflector allows creating multiple assembly lists and switching between the lists using the File, Open List dialog. To choose a different set of default assemblies for the current assembly list you should remove all assemblies from the list (DEL) and invoke the Refresh command (F5).
Assembly Cache: When resolving an assembly reference, Reflector will first search the local path next to the assembly holding the reference and then falls back to the cache directories defined in the Reflector.cfg file. Reflector does not search the Global Assembly Cache (GAC) unless you add “%SystemRoot%\Assembly” to the cache directories list.
Assembly Versioning: By default, assembly version numbers are ignored when resolving type and member references. You can enable side-by-side versioning in the options dialog but it is suggested to avoid this if possible.
Add-Ins: Information about the Reflector add-in model can be found here.
at 10:07 PM 0 comments Posted by roni schuetz
Tuesday, October 28, 2008
Microsoft Project Code Named “Velocity” CTP2
“Velocity” is a distributed in-memory application cache platform for developing scalable, high-performance applications. “Velocity” can be used to cache any common language runtime (CLR) object and provides access through simple APIs. The key aspects of “Velocity” are distributed cache performance, scalabily, and availability.
Microsoft Download Link
Related Resources
“Velocity” Team Blog
“Velocity” Code Samples
Microsoft project code named “Velocity” Homepage
“Velocity” Documentation on MSDN
soon I try to make some comparsions between velocity and shared cache.
at 8:43 AM 2 comments Posted by roni schuetz
Labels: cache, news, SharedCache, SharedCache thought, velocity
Monday, October 27, 2008
ajax status display like google apps
during cleanup of my files i found the following Javascript status display js class.
unfortunately i don't know from where i have downloaded it, so if you know let me know that I can update this entry and add a link to the owner.
var ajaxStatus = Class.create();
ajaxStatus.prototype = {
ajaxStatusDisplayUserMessageElementID: 'ajaxStatusDisplay_userMessage',
ajaxStatusContainerID: 'ajaxStatusContainer',
ajaxStatusContainerCssClass: 'ajaxStatusDisplay_userStyle',
userDefinedAjaxStatusContainerCssClass: false,
ajaxStatusMessageContainerID: 'ajaxStatusMessageContainer',
ajaxStatusMessageContainerCssClass: 'ajaxStatusDisplay_userMessageStyle',
userDefinedAjaxStatusMessageContainerCssClass: false,
useUserCssStylesContainerID: 'ajaxStatusDisplay_useUserCssStyles',
statusMessage: 'Loading...',
useUserCssStyles: false,
/*
Function: initialize
Description: Creates the hidden status display elements and configures
the default status message and css styles
*/
initialize: function() {
// Create the ajax status container
Element.insert(
$$('body')[0],
{'bottom':
new Element('div', {
id: this.ajaxStatusContainerID,
style: 'display: none'
})
}
);
// Create the ajax status message container
Element.insert(
$(this.ajaxStatusContainerID),
{'bottom':
new Element('div', {
id: this.ajaxStatusMessageContainerID
})
}
);
// Setup the css styles
this.setCssStyles();
// Setup the status message text
this.setStatusMessage('');
// Register the global Ajax responders
// to show hide the status container
Ajax.Responders.register({
onCreate: this.toggle.bindAsEventListener(this),
onComplete: this.toggle.bindAsEventListener(this)
});
},
setCssStyles: function() {
// If the user has defined styles
if (document.styleSheets.length > 0) {
var theRules = new Array();
// If this is Firefox or other W3C complient browser
if (document.styleSheets[0].cssRules) {
theRules = document.styleSheets[0].cssRules;
}
// If this is IE
else if (document.styleSheets[0].rules) {
theRules = document.styleSheets[0].rules;
}
// Loop over the css rules
for (i = 0; i < theRules.length; i++) {
// If the current rule matches the name of the ajax status container css class
if (theRules[i].selectorText == '.' + this.ajaxStatusContainerCssClass) {
this.userDefinedAjaxStatusContainerCssClass = true;
}
// If the current rule matches the name of the ajax status message container css class
else if (theRules[i].selectorText == '.' + this.ajaxStatusMessageContainerCssClass) {
this.userDefinedAjaxStatusMessageContainerCssClass = true;
}
}
}
// If the user definfed css styles with the specific name
// for the ajax status container
if (this.userDefinedAjaxStatusContainerCssClass) {
// Set css class name for the container
$(this.ajaxStatusContainerID).addClassName(this.ajaxStatusContainerCssClass);
}
else {
// The user has not defined the custom css style class
// so apply default style
$(this.ajaxStatusContainerID).setStyle({
position: 'absolute',
left: '45%',
top: '2px',
height: '10px'
});
}
// If the user definfed css styles with the specific name
// for the ajax status message container
if (this.userDefinedAjaxStatusMessageContainerCssClass) {
$(this.ajaxStatusMessageContainerID).addClassName(this.ajaxStatusMessageContainerCssClass);
}
else {
// The user has not defined the custom css style class
// so apply default style
$(this.ajaxStatusMessageContainerID).setStyle({
background: '#FFF1A8 none repeat scroll 0%',
color: '#000',
padding: '0pt 5px',
fontFamily: 'Arial, Helvetica, sans-serif',
fontSize: '14px',
fontWeight: 'bold',
textAlign: 'center',
width: '100%'
});
}
},
setStatusMessage: function(statusMessage) {
if (!statusMessage.empty()) {
this.statusMessage = statusMessage;
}
else {
// If there is an element on the page with a user defined status message
if ($(this.ajaxStatusDisplayUserMessageElementID)) {
// If the user's status message is inside a input element
if ($(this.ajaxStatusDisplayUserMessageElementID).readAttribute('value') != null) {
// Use the value of the input element
// for the display as the status
this.statusMessage = $F(this.ajaxStatusDisplayUserMessageElementID);
}
else {
// Use the value of the element for the display as the status
this.statusMessage = $(this.ajaxStatusDisplayUserMessageElementID).innerHTML;
}
// Hide the user's status message container
$(this.ajaxStatusDisplayUserMessageElementID).hide();
}
}
$(this.ajaxStatusMessageContainerID).update(this.statusMessage);
},
toggle: function() {
$(this.ajaxStatusContainerID).toggle();
}
};
document.observe("dom:loaded", function() {
// Create an instance of the object defined above
ajaxStatusDisplay = new ajaxStatus();
});
at 10:25 AM 0 comments Posted by roni schuetz
Labels: code sample, java script
Wednesday, October 22, 2008
scuba diving - red see eilat, israel - Part 2
if you like following pictures checkout my previous pictures - pictures are taken during a night dive.
at 8:09 PM 0 comments Posted by roni schuetz
Labels: holiday, personal, scuba diving
Monday, October 20, 2008
Backup and Restore Database for SQL Server
@echo off
@echo BatchJob Start
@echo %date% %time% %0 Start >> ".\!Log\all.log"
@echo on
"Start backup database DISK='%cd%\ABC.bak'" >> ".\!Log\all.log"
osql /E /S localhost /Q "backup database DISK='%cd%\ABC.bak'"
"c:\Program Files\WinRAR\winrar" a ABC.rar erp.bak -df -ibck
"Done backup database DISK='%cd%\ABC.bak'" >> ".\!Log\all.log"
REM NOW WE RESTORE IT
"Start restore database DISK='%cd%\ABC.bak'" >> ".\!Log\all.log"
osql /E /Q "restore database ERP from DISK='%cd%\ABC.bak'"
"Done restore database DISK='%cd%\ABC.bak'" >> ".\!Log\all.log"
@echo off
@echo %date% %time% %0 End >> ".\!Log\all.log"
at 1:00 PM 0 comments Posted by roni schuetz
Labels: batch, code sample, Database, SQL Server
Sunday, October 19, 2008
C# Cross-Thread Operations made easy
Starting with .Net Framework 2.0 and higher, it's a must to write cross-thread operations.
Cross-thread operations in C# are calls on the method that attempts to access an object that was created in a different thread.
Lets say we would like to load data into a DropDown Control from a Background thread we will receive the following error:
Cross-thread operation not valid: Control 'Abc' accessed from a thread other than the thread it was created on.
We can solve this by using simple delegate and the attribute InvokeRequired. Lets look on 2 samples how to succeed with this once with and once without a parameter:
1: private delegate void DelegateManageLink(string url, bool isEmail);
2:
3: private void ManageLink(string url, bool isEmail)
4: {
5: if (this.InvokeRequired)
6: {
7: DelegateManageLink inv = new DelegateManageLink(this.ManageLink);
8: this.Invoke(inv, new object[] { url, isEmail });
9: }
10: else
11: {
12: if (!string.IsNullOrEmpty(url))
13: {
14: string tmp = (isEmail == true ? "mailto:" : "") + url;
15: System.Diagnostics.Process.Start(tmp);
16: }
17: }
18: }
Sample without parameter:
1: /// <summary>
2: /// A delegate method to invoke a method and prevent threading concurrent access
3: /// </summary>
4: private delegate void DelegateCheckServerVersions();
5: private void CheckServerVersions()
6: {
7: if (this.InvokeRequired)
8: {
9: DelegateCheckServerVersions inv = new DelegateCheckServerVersions(this.CheckServerVersions);
10: this.Invoke(inv, new object[] { });
11: }
12: else
13: {
14: // your stuff goes here ..
15: }
16: }
at 8:56 PM 1 comments Posted by roni schuetz
Labels: .net, C#, code sample, Windows Forms
Saturday, October 18, 2008
Googel Analytics - Traffic Sources
Since http://www.cuil.com/ is online I could see in my analytics profile much visits with the source cuil.com. In Google Analytics is an traffic overview for "Search Engines" and I'm asking myself why Google Analytics does not display "cuil.com" also as "Search Engine". Instead of that is cuil.com listed below "All Traffic Sources".
Who know's why Google is doing that?
at 2:50 PM 0 comments Posted by roni schuetz
Labels: general
ORM (Object Relational Mapper) - what is available
Once you get familiar with ORM's you will "Love or Hate" the idea.
For a new project I write I decided to use once more an ORM Tool. There are so many ORM's outside there and because I develop it only in .Net C# and I love the idea for open source I decided I only go for an open source object relational mapper.
Microsoft comes out with some stuff called "Linq to SQL" and "Entity Framework". I could find lot of information about it but in the end I could NOT find a really working solution which is based on a n-tier architecture. Since my point of view is that applications are also applications which are based on different tiers or models I'm not satisfied with this "0815 / drag & drop" Microsoft solutions which are done in 5 minutes.
An application has to be divided into various tiers. Lets say it simple:
- Data Access Layer
- Business Object Layer
- Presentation Layer
if you need more well done but I prefer a clean architecture instead of one Website Project which contains a mix of anything. Can be that for other people it is good enough. Anyway, enough about my personal point of view.
Following criteria are important to me:
- Perspective on Performance
- Perspective on Data-source independence - access various data-sources SQL Server, OBDC etc.
- Perspective on Lazy Load of parent entities
- Perspective on Pluggable Creation Mechanism
- Perspective on Separation Of Tiers And Layering Preferences
- Perspective on Transactions Control
- Perspective on Mapping (1:1, 1:N, N:M)
- Perspective on Query Facilities
- http://www.ornetmapper.com/contact.aspx - Problems to generate ASP.Net Membership Tables needed to adapt code for creating first samples.
- http://www.codeplex.com/crudcodegen - Console application and doesn't display errors
- http://www.codeplex.com/IrisGenerator/Wiki/View.aspx?title=Quick%20Start&referringTitle=User%20Guide - Very nice UI but it throws an exception upon creation, after downloading the solution from codeplex I was not able to compile the solution.
- http://www.codeplex.com/ZFCGDAL - It's a Mygeneration Software Template. I loved to work in past with MyGen but the template Ver 2 does not work for some reasons.
- http://www.codeplex.com/affinityorm - It's only an attempt, currently it display tables and data but not more then that.
- http://www.codeplex.com/mitadata/ - Only contains a test project, not usable
- http://www.codeplex.com/LazyFramework/SourceControl/DownloadSourceCode.aspx?changeSetId=15856 - VB.Net - doesn't match my requirements.
http://www.codeplex.com/netopenfwk - Don't get what this should do with ORM.
http://www.codeplex.com/DbEntry - A huge framework and sample applications are available but how do I generate code I don't know - http://www.codeplex.com/Sculpture - Amazing Model Driven approach - you have to watch screen casts!!!!!
- http://www.codeplex.com/jmr - not active since aug. 2007
- http://www.codeplex.com/autodbupdater - Its not an ORM Mapper (DbUpdater keeps a simple record of all scripts that have previously been run against a database and which 'version' of the database each script was run against)
- http://www.codeplex.com/normal/SourceControl/ListDownloadableCommits.aspx - not active since dec. 2007 - download is not compilable
http://www.codeplex.com/worm - Web ORM - a mix of C# and VB.Net - no clue where to start. - http://www.codeplex.com/nanomapper - Very nice and simple but it would need extensions e.g. save xml schema and selection of tables which have to be generated.
- http://www.codeplex.com/SimpleDAL - started project need to check in some months agian
Notice: if you have an actual ORM mapper which is not listed above post them please (Only Open Source Projects please and no shareware - comments with links to shareware application will not be approved!!).
at 1:46 PM 0 comments Posted by roni schuetz
Labels: .net, batch, Code Generation, Database, open source, Oracle, ORM, SQL Server, WebServices
Wednesday, October 15, 2008
Problems with Asp.Net ProfileCommon class?
I wanted to use built in provided profile provider which is shipped with ASP.Net. I created a Web Application Project (WAP) and figured out that ProfileCommon file is not generated anymore automatically as it has been done in previous visual studio project solution templates.
After quite a while of researching I understood that this seems to be a common problem - it's not worth to write a fully custom provider only for some profile specific settings.
The good issue is - I'm not alone with this problem.
The better thing is - it has been already solved by a project which is available on code.msdn.microsoft.com: Web Profile Builder - thanks to robolize to come up with this solution and sharing it with us.
at 8:39 AM 1 comments Posted by roni schuetz
Labels: asp.net, C#, WAP (Web Application Project)
Saturday, October 11, 2008
Evaldas Jocys: Globalization Resources for Multilanguage Development
http://www.codeproject.com/KB/locale/JocysComGlobalization.aspx?msg=2760744#xx2760744xx
Introduction
This article contains MUST HAVE tables and data for proper multi language development. I highly recommend to use ISO (International Organizations for Standardization) as primary source of information, because this is the only way to go for high quality products and compatibility. Please remember that ISO usually only manages standards. Behind each ISO standard there are companies which supplies databases and updates to commercial users. Internet is also good source of information so I've collected globalization data from various resources and placed into 6 tables. If you have some suggestions then please contact me by email: Evaldas Jocys <evaldas@jocys.com>
Data for these tables are required to produce full multilingual support:
- Languages - information about all languages.
- Cultures - information about all cultures (Language + Country).
- Encodings - information about all encodings.
- Ranges - can help to get customer's culture by IP.
- Currencies - business information about each country.
- Currencies by Country- currencies used in country.
it would be very intersting to combine this with the following:
ASP.NET 2.0 Custom SQL Server Resource
ProviderBy Jeff Modzel
at 5:25 PM 0 comments Posted by roni schuetz
jQuery.com and Microsoft .Net
I think you have read and heard already about a javascript framework called: jQuery this js framework seems to grow and grow ... almost endless. Since Microsoft (Scott Guthrie http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx) announced they gone integrate this framework into Visual Studio they decided finally a takeover a community project into their environment instead to develop something new from scratch. My personal point of view, this is the right decision and they should do this with more projects.
at 12:05 AM 0 comments Posted by roni schuetz
Labels: community, java script, jQuery, open source, visual studio
Friday, October 10, 2008
Trivia - Chaostriva.com
do you like trivia? well I do and found finally a multiplayer trivia game - try this out: http://www.chaostrivia.com/
enjoy and lets play
would be funny to create a quiz about .net, web or anything related to development.
at 10:55 PM 0 comments Posted by roni schuetz
Labels: links
SGML Reader - convert HTML to XHTML
This is a web - based implementation of converting HTML to well-formed XHTML using a solution which could be found in the past at the following location:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B90FDDCE-E60D-43F8-A5C4-C3BD760564BC
There is one problem with this location, Microsoft closed gotdotnet.com so I decided to upload my adapted version. Maybe somebody knows how is the creator of this library so I can add this here.
You can download it from here: www.ronischuetz.com/download/sgmlreader.zip
at 10:30 PM 1 comments Posted by roni schuetz
Labels: .net, asp.net, C#, code sample, Helper Code, xhtml
dictonary serializable
after some researches how to serialize dictonary in .net I found the following solutions:
only XML serialization: http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx
inclusive Binary serialization: http://blogs.microsoft.co.il/blogs/applisec/archive/2008/02/23/serializable-dictionary.aspx
at 10:17 AM 0 comments Posted by roni schuetz
Labels: .net, C#, links, SharedCache
scuba diving - red see eilat, israel
I been for 2 weeks in eilat, israel were I did my scuba diving PADI divemaster certification. Enjoy some pictures from my apprenticeship and some fundives ....
at 12:50 AM 0 comments Posted by roni schuetz
Labels: holiday, personal, scuba diving
Wednesday, September 10, 2008
New Personal Website
I uploaded a new website, let me know what you think about: http://www.ronischuetz.com
at 10:35 PM 0 comments Posted by roni schuetz
Labels: links
LogParser SQL Statemts for IIS Log files
I uploaded some LogParser SQL Statements for IIS Log files.
- http://www.ronischuetz.com/code/AverageResponseTimePerHour.html
- http://www.ronischuetz.com/code/Hit_Frequency.html
- http://www.ronischuetz.com/code/NetworkAnalysis.html
- http://www.ronischuetz.com/code/RequestsPerHour.html
- http://www.ronischuetz.com/code/RequestsPerMin.html
- http://www.ronischuetz.com/code/RequestsPerMin_WebSites.html
- http://www.ronischuetz.com/code/ResponseTime.html
- http://www.ronischuetz.com/code/Top50LongestRequest.html
- http://www.ronischuetz.com/code/unique_clients.html
- http://www.ronischuetz.com/code/uniqueClientsPerHour1.html
- http://www.ronischuetz.com/code/uniqueClientsPerHour2.html
with a simple batch job you able to execute all queries at once:
Download: http://www.ronischuetz.com/code/LogParserSqlScripts.zip
at 10:31 PM 0 comments Posted by roni schuetz
The Difference Between Piping and Polling
Jeff Standen explains about "The Difference Between Piping and Polling"
Piping (a.k.a. Pushing)
With the piping method, e-mail is delivered to an application in real-time at the cost of server resources and redundant application overhead.
Pros:
It’s fast. E-mail is delivered to the helpdesk proactively and in real-time.
It’s modular. The relatively expensive operations required to convert a raw MIME e-mail message into plaintext with usable file attachments can be offloaded to a speedy, specialized application. In previous versions of Cerberus Helpdesk, e-mail processing was handled by a parser written in the “C” programming language.
Cons:
It doesn’t scale well. Each new message is processed concurrently, each costing the overhead of the application starting up, initializing resources, processing, and then shutting down between each handled message.
It can bounce/blackhole messages. Since mail is delivered in real-time, the mail server is generally looking for an immediate clear-cut success or failure response code from an application. That means if you’re upgrading, tweaking, rebooting, or otherwise taking your helpdesk offline for a few minutes, new mail is bouncing for later retry. That’s normal behavior. However, if your helpdesk is accessible but in a broken state (e.g. halfway through an upgrade, having database issues) then it’s possible for mail to be accepted but not processed.
at 2:19 PM 0 comments Posted by roni schuetz
Labels: links
Saturday, August 30, 2008
GetHashCode() have been changed
As its written in MSDN (http://msdn.microsoft.com/en-us/library/system.string.gethashcode.aspx):
Remarks:
The behavior of GetHashCode is dependent on its implementation, which might change from one version of the common language run-time to another. A reason why this might happen is to improve the performance of GetHashCode.
In the following versions exactly this happens:
- 2.0.50727.3053
- 2.0.50727.1433
Let's say you like to do something for load-balancing based on the following code:
return Math.Abs((key.GetHashCode() % serverAmount));
it will return a different server node in case of shared cache. To handle this issue we have added 2 things, first of all is an alternative hashing algorithm and second we check the run-time between clients and server and inform clients about it in case this happens.
If you are using a version of shared cache which is below 2.0.3.276 you need to keep all your systems up-to-date with the same CLR version or you decide to use a different hashing algorithm for your system. Within our notifier program you can check this quite easily.
To use following options you will firstly need to register, the registration can be done during installation or afterwards within a new option within menu context of SharedCache.com Notify application.
- Check if all environments are using same CLR
- A Test to check if you able to use all Hashing Algorithms
- Get Informed if your environment is using same version of shared cache, this is mostly important to grant all communication options between clients and caching nodes on your servers.
for more information about hashing algorithms which are supported by shared cache visit my website: http://www.sharedcache.com/ - or go directly to http://www.sharedcache.com/cms/shared_cache_notify.aspx
at 7:16 PM 0 comments Posted by roni schuetz
Labels: .net, C#, cache, clr, SharedCache, SharedCache thought, surprised
Friday, August 29, 2008
LINQ to SQL Serialization
Use the Generics, Extension and Reflection features to implement a generic serialization class library for LINQ to SQL classes
http://www.west-wind.com/WebLog/posts/147218.aspx
http://sql.codeproject.com/KB/linq/linqsqlserialization.aspx
at 4:00 AM 0 comments Posted by roni schuetz
Labels: links
Tuesday, August 26, 2008
Build a Web Chat Application using ASP.Net 3.5, LINQ and AJAX (in C# 3.5)
Junnark Vicencio explains how to build a chat application within 2 hours.
Technologies Used: ASP.Net 3.5, AJAX, JavaScript, C# 3.5, LINQ-to-SQL, MS SQL Server 2000/2005
http://www.junnark.com/Articles/Build-a-Web-Chat-Application-Using-ASP-Net-LINQ-and-AJAX-CS.aspx
at 11:10 PM 0 comments Posted by roni schuetz
Thursday, August 14, 2008
Check if server is available before you make requests
I had to implement a fallback system in case one of my primary servers is not available anymore because of any reason. There were no option to access servers over a loadbalancer or something else then a direct routing to each server.
After some compassion's how much time I gone waste for each request between usage of sockets or HttpWebRequest / WebRequest I decided to work directly with Sockets.
The implementation I decided to go for were quite easy (remember: keep it simple as possible) and its fast like hell - 9ms I'm loosing each check if the server is available or not. We use 2 servers - so I have to remember that there is a total of 18ms I'm loosing each time we have a running cycle to analyse data. In general my tests gave showed me that 5 of the 9 ms are used for DNS.GetHostEntry(ServerName) - if you can use IP-Addresses then I suggest to do it that way. Check out one of my previous post about this DNS.GetHostEntry(ServerName) - IPAddress.Parse("127.0.0.1") vs. Dns.GetHostEntry("127.0.0.1")
With those ~20ms we can leave very good because a cycle needs right now something around 2.5min and it can be a max. of 15min. So how to solve this is the question, here the codesample from MSDN which I adapted and using to validate if my servers are online: http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.aspx
Formatted Code is available here: http://www.ronischuetz.com/code/CheckIfServerIsAvailable.htm
1: private static bool ConnectSocket(string server, int port)
2: {
3: Stopwatch sp = new Stopwatch();
4: IPHostEntry hostEntry = null;
5: bool result = false;
6: sp.Start();
7: // Get host related information.
8: hostEntry = Dns.GetHostEntry(server);
9: sp.Stop();
10: Log.Info(string.Format("ConnectSocket->Dns.GetHostEntry({0}) needed: {1}ms ",server, sp.ElapsedMilliseconds));
11: sp.Reset();
12:
13: // Loop through the AddressList to obtain the supported AddressFamily. This is to avoid
14: // an exception that occurs when the host IP Address is not compatible with the address family
15: // (typical in the IPv6 case).
16: foreach (IPAddress address in hostEntry.AddressList)
17: {
18: sp.Start();
19: IPEndPoint ipe = new IPEndPoint(address, port);
20: Socket tempSocket = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
21: tempSocket.ReceiveTimeout = 1000;
22: tempSocket.SendTimeout = 1000;
23: // this is very important!!! Do not delete this.
24: tempSocket.NoDelay = true;
25:
26: try
27: {
28: tempSocket.Connect(ipe);
29: #region Status Check
30: if (tempSocket.Connected)
31: {
32: #region Connnected Section
33: result = true;
34: if (tempSocket != null)
35: {
36: try
37: {
38: tempSocket.Shutdown(SocketShutdown.Both);
39: tempSocket.Close();
40: }
41: catch (Exception ex)
42: {
43: // do nothing - only release resources and don't let the system fuck up
44: }
45: finally
46: {
47: tempSocket = null;
48: }
49: }
50: #endregion Connnected Section
51: break;
52: }
53: else
54: {
55: continue;
56: }
57: #endregion End Status Check
58: }
59: catch (Exception ex)
60: {
61: string title = string.Format("Could not connect to server:{0}:{1} - " + Environment.NewLine + ex.Message + Environment.NewLine + ex.StackTrace, server, port);
62: Log.Info(title);
63: Log.Fatal(title);
64: result = false;
65: }
66:
67: sp.Stop();
68: Log.Info(string.Format("ConnectSocket->hostEntry.AddressList({0}) needed: {1}ms to connect to server ", ipe.Address.ToString(), sp.ElapsedMilliseconds));
69: sp.Reset();
70: }
71: return result;
72: }
at 8:51 PM 0 comments Posted by roni schuetz
Labels: C#, Database, development, Helper Code, performance, Testing
Wednesday, August 13, 2008
Visual Studio 2008 and .NET Framework 3.5 Service Pack 1
The next service pack is finally available. If you are using .NET 3.5, or want to use any of the new features that we have been talking about being added in this service pack, I’d strongly recommend you upgrade to this. You can download it here.
So what are the new features in this, well for a Service Pack, quite a lot. Check them all out:
ASP.NET Dynamic Data, which provides a rich scaffolding framework that enables rapid data driven development without writing code, and a new addition to ASP.NET AJAX that provides support for managing browser history (back button support). For more information, see What’s New in ASP.NET and Web Development.
Core improvements to the CLR (common language runtime) that include better layout of .NET Framework native images, opting out of strong-name verification for fully trusted assemblies, improved application startup performance, better generated code that improves end-to-end application execution time, and opting managed code to run in ASLR (Address Space Layout Randomization) mode if supported by the operating system. Additionally, managed applications that are opened from network shares have the same behavior as native applications by running with full trust.
Performance improvements to WPF (Windows Presentation Foundation), including a faster startup time and improved performance for Bitmap effects. Additional functionality for WPF includes better support for line of business applications, native splash screen support, DirectX pixel shader support, and the new WebBrowser control.
ClickOnce application publishers can decide to opt out of signing and hashing as appropriate for their scenarios, developers can programmatically install ClickOnce applications that display a customized branding, and ClickOnce error dialog boxes support links to application-specific support sites on the Web.
The Entity Framework is an evolution of the existing suite of ADO.NET data access technologies. The Entity Framework enables developers to program against relational databases in according to application-specific domain models instead of the underlying database models. For more information, see Getting Started with the Entity Framework. The Entity Framework introduces some additional features, including support for new SQL Server 2008 types, default graph serialization of Entities, and the Entity Data Source. This release of the Entity Framework supports the new date and file stream capabilities in SQL Server 2008. The graph serialization work helps developers who want to build Windows Communication Foundation (WCF) services that model full graphs as data contracts. The Entity Data Source provides a traditional data source experience for ASP.NET Web application builders who want to work with the Entity Framework.
LINQ to SQL includes new support for the new date and file stream capabilities in SQL Server 2008.
The ADO.NET Data Services Framework consists of a combination of patterns and libraries, which enable data to be exposed as a flexible REST (Representational State Transfer)-based data service that can be consumed by Web clients in a corporate network or across the Internet.
The ADO.NET Data Services Framework makes data service creation over any data source. A conceptual view model of the underlying storage schema can easily be exposed through rich integration with the ADO.NET Entity Framework. Services created by using the ADO.NET Data Services Framework, and also compatible Windows Live (dev.live.com) services, can be easily accessed from any platform. For client applications that are running on Microsoft platforms, a set of client libraries are provided to make interaction with data services simple. For example, .NET Framework-based clients can use LINQ to query data services and a simple .NET Framework object layer to update data in the service.
Windows Communication Foundation now makes the DataContract Serializer easier to use by providing improved interoperability support, enhancing the debugging experience in partial trust scenarios, and extending syndication protocol support for wider usage in Web 2.0 applications.
The .NET Framework Data Provider for SQL Server (SqlClient) adds new support for file stream and sparse column capabilities in SQL Server 2008.
As for Visual Studio 2008, the Service Pack can be found here.
The following technologies have been tested and verified to work with SP1:
Silverlight 2 SDK Beta 2 & Silverlight Tools Beta 2. (If Silverlight Tools Beta 2 is already installed, you must upgrade it after you install Visual Studio 2008 SP1. To upgrade, use the installer on the Silverlight Tools Beta 2 page on the Microsoft Download Center Web site.)
- MVC Preview Release #3
- ASP.NET Extensions/Dynamic Data Preview
- VC 2008 Feature Pack
- VB PowerPack Controls (2.0 & 3.0)
- Expression Studio 2 (RTM)
- SQL Server 2008
- .NET Framework 3.5 SDK
- XSLT Profiler
- VSTA 2.0 SDK
- Visual Studio 2008 SDK
at 9:52 PM 0 comments Posted by roni schuetz
Labels: visual studio
Windows Command Line FIND instead of GREP
People have maybe heared of grep on linux boxes... today I wanted to do a small count for the appeareance on a windows box where we host a log file with 500k rows.
P:\>find /?Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]
- /V Displays all lines NOT containing the specified string.
- /C Displays only the count of lines containing the string.
- /N Displays line numbers with the displayed lines.
- /I Ignores the case of characters when searching for the string.
- /OFF[LINE] Do not skip files with offline attribute set.
- "string" Specifies the text string to find.
- [drive:][path]filename Specifies a file or files to search.
If a path is not specified, FIND searches the text typed at the promptor piped from another command.
update: otherwise you can also use qgrep: http://malektips.com/xp_dos_0011.html
at 1:37 PM 0 comments Posted by roni schuetz
Usability
in general usability means the following
- the system is easy to use and re-use
- the system can be used efficiency
- small amount of bugs / failures
- users are happy with software
but think also about factors like
- Effectiveness - customer can find anything they like to.
- Efficiency - data can be find easily and fast.
- Satisfaction - customers are satisfied of your application and they come again and again
this has been translated from the following website: http://www.samplezone.ch/ideologie/usability/ I absolutly aggree with above terms if they really do and life this terms I don't know.
at 12:34 PM 0 comments Posted by roni schuetz
How to find readable time difference bettween Oracle date types?
It is not crucial, but it is cool. This way you can find time date/time difference nicely. its very cool :-)
SELECT
lpad(EXTRACT(HOUR FROM(dend_date - dstart_date) DAY TO SECOND),2,’0′) ‘ hour ‘ lpad(EXTRACT(MINUTE FROM(dend_date - dstart_date) DAY TO SECOND),2,’0′) ‘ minute ‘ lpad(EXTRACT(SECOND FROM(dend_date - dstart_date) DAY TO SECOND),2,’0′) ‘ second ‘ “Interval”FROM process_logorder by dstart_date desc;
ref::Oracle® Database SQL Reference10g Release 2 (10.2)B14200-02
thanks to: http://inanme.wordpress.com/2007/01/29/how-to-find-readable-time-difference-bettween-oracle-date-types/
at 10:46 AM 0 comments Posted by roni schuetz
Tuesday, August 12, 2008
Project phases
Preparation phase
Understand problems even if you need to request additional meetings for this. there is always somebody who can explain you details. creation of a basic to make decisions (Date, Budget, Environment, etc.). it will help all team members if you have a small model with a term overview - so everybody talks about the same. Try to identify risks and create a ranking of them - I use usually a range of 1 - 5. Each risk will be rated and it makes sense to discuss them with other people in your team.
Design phase
create all available use cases for your application. explain different use cases with 2 / 3 simple sentences. at this stage you start with architectural questions for system and environments. i suggest you start with a small front-end prototype which you can present your end users. you gone receive tons of feedback's.
Creation phase
start up with your development were you firstly describe your use cases deep enough that you able to develop unit tests and think about using aspect programming.
Entry phase
create presentations for the software - best case is if customers / target clients already know about what you are gone talk then we have integrated them deep enough into previous phases. The entry phases are usually very stressful and harm business incoming therefore don't forget: as better you prepare yourself as easier it gone be!
at 10:01 PM 1 comments Posted by roni schuetz
Labels: agile project, project management, project principles
Important principles of agile projects
spunk
trust to solve problems tomorrow once they appear tomorrow. Feel free to come up with your concerns about actual problems today on a constructive way - do it before somebody else does it.
communication
arrange face2face meetings - project members which meet they feel more comfortable to work together. Any problem is important to solve - communication problems are most important to solve.
feedback
force acceptance tests of your target clients, make reviews with other team members to receive feedback's about possible better solutions.
simple
search for the simplest solution to solve your problem - exactly to solve upcoming problem. For 5 different problems think about 5 simple solutions instead one very complex solution. next time you know enough about the problem to solve all them together in one very simple solution.
at 9:50 PM 0 comments Posted by roni schuetz
Labels: agile project, project management, project principles