Me, Myself and Mayvelous
8 Mar
What is O/R Mapper?
O/R Mapper (Object-Relational Mappers) is a programming technique for converting data between incompatible type systems in databases and Object Oriented Programming languages. (# Ref)
What does it do?
The generated code from the O/R Mapper handles all of the steps that you would normally have to code yourself, saving you from having to:
What is LLBLGen Pro
LLBLGen Pro is a complete O/R mapper and data-access tier generator for .NET. It generates a data-access tier and business façade/support tier (in C# or VB.NET), using an existing database schema set. The generated .NET code is provided as a Visual Studio.NET project that can be added to a solution or compiled separately. (# Ref + More Info)
LLBLGen Pro Features
A key feature in LLBLGen Pro is dynamically-generated SQL. When retrieving or manipulating data in a database, the SQL script — the code understood by the database — is generated at run-time based off the requested information and dirty flags in each entity’s fields. This enables a generic save entity function on the Data Access Tier to produce different and optimized SQL code each time it is called, optimizing bandwidth usage and database load. (# Ref)
# Ref: Rapic CSharp Windows Development. pp. 17
LLBLGen Pro Objects
Project Types: SelfServicing Vs. Adapter
There are two types of LLBLGen Pro Projects namely – SelfServicing and Adapter.
# In SelfServicing template group, entity objects are responsible for their own persistence (saving their own changes to DB).
# The entity class itself contains logic to know which fields were updated and where to find the database.
# Lazy Loading is useful cos’ it abstracts the specific DB call from the upper layers of code.
# Adapter template group: uses an object called a DataAccessAdapter to interact with DB
# SelfServicing: bundles persistence inside entity objects
# Allows data to load itself automoatically as it is needed without explicit commands.
7 Mar
I’m learning new things these days and am just sharing some notes here. I’m still learning and these technologies are very new for me, hence my notes gonna have heaps of errors and wrong information. You are most welcome to correct them, fill some more in and share you notes with me too. Alright, so we are set to go.
I’ll be updating this post with links so still tune.
All the notes are subject to change as I’ll be filling in with more info later.
16 Nov
This is one of the most frustrating errors I’ve got to fix. I’m using rad editor for my aspx pages and in some pages, it works like a charm but some just doesn’t. Whenever I tried to update the page, it threw this error, “An error has occurred. Refresh the screen and try again”, in the rad editor content area.
My first thought was, the files much be read-only and hence to make writable to the files but it wasn’t the case. So I checked my code, cross check with another working page, recheck again and again, but I found no difference in code and doesn’t work. Then I created a new “test.aspx” file and pasted the same code and tested it. Strange enough, it works!
So I thought may be my page got corrupted, so I deleted that page and recreated a new page with the same name, paste the code back in. Then it’s not working again. The same god damn code in “test.aspx” is working and not in the other page.
Something was really fishily wrong! Since they are the exact same code, the only difference I can think of now is the file name. But I can’t change all the file names without knowing whether that’s the actual cause of the problem. So my final option, turn to google for help and there it was!
(ID#250) “An error has ocurred. Refresh the screen and try again”
PROBLEM
When saving the content from r.a.d.editor directly in the ASPX/ASCX the following error appears:
An error has ocurred. Refresh the screen and try again.SOLUTION
When saving the r.a.d.editor content directly in the ASPX/ASCX the page name should not contain “(“, “)”, “-”, or ” ‘ “. If such names are obligatory, r.a.d.editor’s content should be saved in a database.Link: Telerik KB Article
So stupid error. My error files are named using the “-” dash. Once I removed the dash, all working. It’s just so lame error message and even in the KB no explanation about why it cannot use a dash in the file names. Well you can use dash if you saving content in DB, but why not in the actual file? I just not satisfy with that KB solution explanation. Nevertheless, it solved my problem and thank god for that. Took hell lotta time from me. I guess next time, I better google first then check on my code. Hmm.
25 Jul
Whenever you get this kind of error messages with instructions, do not follow the instruction straight away.
Always turn to your best friend, google, to see how others solve it and search for the best possible answer.
May be this is a bad advice but I never trust error message instructions. Of course you must read the message and instruction properly to see it is a sensible/reasonable instruction on the problem. As for me, I just have to find out whether others are actually following the instructions as mentioned or not.
The error:
Unable to find script library ‘/aspnet_client/system_web/1_1_4322/WebUIValidation.js’. Try placing this file manually, or reinstall by running ‘aspnet_regiis -c’.
The error dialog box pops up on those pages with form validation.
This problem happens whenever the system cannot access aspnet_client folder either you don’t have a permission or it is not in your root directory, ie. when you changed the root directory for your virtual folders, from Inetpub/wwwroot to some other folder, and when you use Validation controls (eg. RequiredFieldValidator, ValidationSummary, etc) on input TextBoxes in one of your site.
You can check whether you are using the default root or not by checking the property > Home Directory of your IIS virtual directory as shown on the following images.
For this error, I don’t like uninstalling IIS and reinstall again just for the sake of one site error. There got to have some easier way to solve it and yes, there is.
I’ve also found out that when you follow the error instructions straight away, you might screw up the problem more and some of the google results shows that it actually got screwed in some cases.
Some people uninstalled and reinstalled IIS but that doesn’t solve the problem and they have to uninstalled and reinstalled .net framework as well.
Different solution for different cases I’m sure, but for my case, I tried the easiest resolution ie. copy the aspnet_client folder from wwwroot to my new virtual root folder, and voila it works!
Read more in the following sources:
9 Aug
By default, once you create web applications/services, the project files are saved in Inetpub > wwwroot directory.
To move from default location to your own project directory you must:
The new project now will be saved in the folder you speficied rather than in default wwwroot folder. This makes it alot easier to manage your project files and better work folder organization.