|
Hi,
I am developing a sample project using MVC and Entity framework. just wondering to know how can I use silverlight? Is it possible? Does silverlight pages use instead of aspx pages?
thanks in advance for your help,guys.
|
|
|
|
|
Hi,
In old style i used to return datasets to BOL (From DAL) and then to Website. but in 3.5 is there any new way to construct DAL. i heard about returning List<> is better than DataSet. Please suggest me which is the best way.
I Got to build new DAL for my new project. if i should go for List <> aprroach can i use Linq to Sql technique or shall i go for execute dataset (using applicatio block libraries) and then fill data in List<> prior to return it back to BOL.
Thanks
Naidu
vrsanaidu
asp.net webdeveloper
|
|
|
|
|
I voted this as a bad question not because it is a bad question but because it is not a good one. Some one keeps marking questions as good when they are, in-fact, neither good nor bad.
There are a lot of ways to construct a DAL and there are many tools which will purport to do all of the work for you. However, there is one thing none of those tools will do and that is help you to understand the business requirements. Time and again I see duplicated and wasted effort from DAL Generator based systems because no one took the time to ask why, knowing, it is trivial to rewrite the DAL.
Personally, I prefer hand coding, if for no other reason that it forces me to understand the object graph that is being constructed and to choose the most effective manner for doing so without fighting a tool-kit. Write your DAL yourself and you will learn a lot. 3.5 makes it really easy with automatic properties.
Below is a quick sample, it is real easy and there is no magic anywhere. Any developer should be able to figure this out:
public class Customers : List<Customer>{}
public class Customer : IEntity{
public Int32? Id{get;set;}
public string Name{get;set;}
public DateTime CreateDate{get;set;}
internal static Customer Create(SqlDataReader reader){...}
}
|
|
|
|
|
Some of the most common reasons people give for using List<T> instead of datasets are:
Datasets are big and come with a lot of overhead.
Datasets are subject to more runtime errors due to data type issues.
List<T> gives you access to all sorts of cool extension methods in Linq which are also compile time checked versus using sql filters on datasets which are runtime checked.
You could jump straight to 4.0 instead of 3.5 and use Entity Framework[^].
|
|
|
|
|
Once upon a time I lived in hope that someone somewhere could show me the correct way to structure an application and pass data between the layers.
I gave up, because there is no right way.
There is virtually no point in trying to figure out whether it's better to pass around DataSets, Lists, XML, or some other representation of your data.
You would not only have to figure out the verious pros and cons of each method, you'd be confused into a stupor by trying to seperate facts from the quasi-religious views of the very "experts" that would be offering to reveal the facts.
So. Forget for one second that there are Datasets and Lists etc. Figure out what constraints are in place, then figure out what service you're Data Layer needs to perform and then work from there.
For example...NHibernate is cool, but If your organisation won't let you install NHibernate then NHibernate is out immediately. Simples.
Next try and figure out as many different ways of moving data around that fit within your constraints. Actually build a few vertical slices of applications. You'll learn more from doing this that from reading 100 pro/con articles.
DataSets have some powerfull features for tracking changes to data. DataSets are also wonderfully simple to bind to.
If you code custom business objects and pass around lists, are you prepared to do the work necessary to replicate that functionality? Do you even need to replicate it?
Is your DataLayer adding any value. I can't count the number of times I've seen Business Layer Objects that pass their data to a Data Layer Object that do nothing more than pass the same data through to the Database.
This might be worthwhile if there was a potential for swapping out the Data layer, but that's so rarely the case.
Of late I have become very fond of domain objects that are completely ignorant of the database. There is no DB logic in there at all. The domain objects don't even know about the Data Layer objects.
I don't really care about DataSets, Lists, XML, NHibernate etc. Those are implementation details, the big issue is the persistence ignorance.
That's not to say that persistence ignorance is always the way to go. The project I'm working on right now doesn't use it because I'm working within contraints that were already in place when I arrived. And that's fine.
Worrying about Datasets vs Lists without knowing the big picture is like obsessing over a Sedan or an SUV even though you have no idea where you'll be driving or how many passengers you'll have.
If I could sum up my philosophy on this I would say the following:
Build Apps using the simplest solution possible until you know enough to justify why a more complicated solution gives enough long term advantages to justify itself.
If someone doesn't know whether they should use DataSets or not then they should use DataSets until they figure out why they shouldn't.
Hope that helps.
|
|
|
|
|
Hi people,
Sorry if this isn't the right place to post this. I have posted my message already in the Visual Studio forum but still didn't get any answer. I also posted it in asp.net forums and in MSDN forums and still nothing. I have also searched the web without much success. I am hoping someone here can help me figure out what is going on.
Here is the link to my post in the VS forums: http://www.codeproject.com/Messages/3573698/Issues-with-VS-2010-editor.aspx[^]
I would like to add that I have the same Visual Studio 2010 Premium edition installed on two PCs, one is working well and the other is having the issue mentionned above. I would appreciate any insight or suggestion about this crazy matter.
Thanks,
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Do not cross-post: if you didn't get an answer the first time it's because no one has the answer or doesn't want to answer: all that happens now is that you are very unlikely to get the answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Anyway I think I know what the problem is.. in HTML edit mode, check which doctype it's targetting. It's a dropdownlist next to the buttons to comment things. So be sure to target the correct doctype.
hope this helps
"My personality is not represented by my hometown."
|
|
|
|
|
Thanks for replying, is this the target validation schema validation you're talking about or is there another dropdown that I need to find?
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
that's indeed the dropdown I'm referring to (wasn't sure about the name; didn't have VS open at the time)
"My personality is not represented by my hometown."
|
|
|
|
|
IS this still an issue? just wanted to know if you've figured it out by now (perhaps a re-install of Visual Studio / your PC will be sufficient )
"My personality is not represented by my hometown."
|
|
|
|
|
Hi
Well, it's my PC at home that is causing me problems. Here at work VS2010 is doing well. I have removed it from my PC at home, in fact I have restored the Norton Ghost image of a clean Windows install. Do you think this could be the issue? The ghost image has a few things installed like VS 2008, SQL 2005, Office 2007 and some other things. Unfortunately I didn't have time to reinstall VS 2010 yet (as you know, it takes ages ) I will keep you updated with what happens when I do install it
Yesterday, I have tried what you suggested with the validation stuff. I wanted to see if I could get the same behavior like what I was getting at home but I didn't get that. I don't think it's due to the doctype because when I switch the target framework to 3.5 the problem disappears (with the same solution). It is quite frustrating honestly as apart from you, I didn't get any reply to any of my posts at asp.net or msdn. Like if nobody encountered that problem before!
The only difference I see with what I have in the office is that I have installed SQL server 2008 before installing VS 2010 here, but I really doubt it could be the issue. Anyway, as you said, it could just be a matter of reinstalling it. Once I do reinstall, I'll let you know what I get
Thanks again!
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Yeah I know how answering a question sometimes can be difficult for some people. Instead of directly answering the question, precious time is spent by saying how it's not in a correct format :P Nonetheless, questions should be posted in a correct format though.
Anyway, what my suggestion is: try to create a virtual environment to do all of your coding. A solution like VMWare[^] or Virtual PC[^]could save you a lot of headaches. I always work in a Hyper-V setting, which also provides functions to save and revert back to snapshots. This way you can guarantee yourself of having a clean install of your workstation every time. The only thing you'll have to do is save your files on a remote storage device. The chance of something happening that will screw your configuration up is very slim that way.
Nevertheless, I'm looking forward to the cause of your issue was.
Good luck!
"My personality is not represented by my hometown."
|
|
|
|
|
Well, the major issue is that VS 2010 takes a lot of time to install anyway, but I could actually try using Virtual PC and see if it helps me
Now you won't believe what I just discovered now...just now I was playing a bit with VS 2010 here at work and I am also having a weird behavior but not as weird as what I had at home
Anyway, here is what I have noticed. I opened a .aspx page. By default, as you know, it opens in HTML editing mode. So I clicked inside a button tag. Guess what?? in the properties windows, it says: Button1 . Then, in the fields below, I have the proper fields displayed like CausesValidation, CommandName, etc...Note that I DON'T have the events button. Now, I click on Split to split the editor into design and editor mode. I click around the HTML code a bit and then on that same button tag and in the properties now I have Button1 System.Web.UI.WebControls.Button and now I have the events button. Now going back to Source (HTML edit), again I have Button1 !!!
As I recall, I wasn't having that behavior at home, it was always Button1 and I don't remember I was able to get the correct property displayed. As I said before, I will install again and see what happens, but now I know that something is definately not right in this VS 2010
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
What happens if you just ignore this behavior, and just continue coding?
"My personality is not represented by my hometown."
|
|
|
|
|
aaargh well it works well in fact, I was just trying some things and it doesn't have an impact on compilation nor on execution. So we can very well live with it. One thing that differs between what I have here and what I have at home is the fact that at home I have this green wave-like line under the name of the web controls, e.g. Button. I don't have that here. But even at home it compiles well, however AJAX wasn't working, meaning when I click, nothing happens on the page. Whereas here, AJAX works. I'm telling you, this VS 2010 is haunted If I can get things to work at home as they are working now in the office, I would be happy, even if it's not perfect
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
|
|
Hello,
I have hosted my web application on the server. It works fine when i have one copy of the Website. My requirement to create multiple copies of websites in the sub directories. I need the same copy of web.config in my subdirectories as well. But when i access website from subdirectory i get the following error
" It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level'"
I know that i need to set the subdirectory as Virtual folder and if i do that in my local IIS it works. But how do i do this on the Web hosting server?
Please help
Thanks
|
|
|
|
|
Google[^]?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Hi All,
I am working on a ASP.Net web application wherein I am calling a class method Asynchronously to get the data from data base (using AsyncCallback) on page load. after the completion of this callback method raises an event. I'm handling the event on the asp.net page wherein I'm assigning the datasource to a grid view. Everything is going good except for the page is not getting refreshed after the event is getting fired. I have checked the datasource of the grid is assigned properly but the contents are not shown on the page.
Please Note:
I'm calling the method Asynchronously so after the event is fired and after assigning the data source to the grid and after data binding it i want to post back the page to the server so that the latest contents of the page are visible on the page. I want to refresh the entire page on that event.
Please help its Urgent
Thanks and Regards
Paramhans
|
|
|
|
|
Paramhans Dubey wrote: Please help its Urgent
Don't be rude. It may be urgent to you but not anyone else here.
I think you are little confused about how to process the page. If you want the entire page to refresh with the data then do a postback. If you want to load the data asynchronous then use something like an UpdatePanel or AJAX methods.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: Don't be rude. It may be urgent to you but not anyone else here.
If asking for help is rudeness then I am sorry for being rude.
My question is that is is there any way to post back the entire page to the server without using Update Panel.
|
|
|
|
|
Paramhans Dubey wrote: If asking for help is rudeness
Asking for help is not rude. Asking an URGENT response is.
Paramhans Dubey wrote: is there any way to post back the entire page to the server without using Update Panel.
Yes, of course there is, that is how ASP.NET works.
Perhaps you need to restate your question.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: Asking for help is not rude. Asking an URGENT response is.
let's finish this here. I apologize for being rude.
and also i restate my question:
I have a long running procedure which takes approx. 1 mins to complete. I am calling the method using a delegate and ICallBack. When my process completes the it raises an event which is handled on UI wherein I am assigning the datasource to grid but as this is a asynchronous update the updates are not visible on the Page. I cant use Update panel in my project.
My question is that is is there any way to post back the page to the server without using Update Panel after asynchronously updating the page to show the updated contents.
|
|
|
|