There are an abundance of ORM tools out there. I guess having many options is better than being forced to use one over the other - or worse, having only one available or none at all.
MBR BootFX is one of them [by Larkware]
I still want to evaluate NHibernate. ORM.NET is another one. NPersist is yet another. I've heard good things about NEO as well.
And then there are commercial ones which doesn't necessarily mean they are better or worse, like:
Deklarit, LLBLGen Pro, WilsonORMapper, etc.
Boy, where am I going to find the time to try all of these!
UPDATE: I checked out Gentle.NET's spec for the next version and I like what I see...
In my latest project, I am using DataSet/DataTable a lot and there have been ups and downs but I am so far pretty happy with the flexibility of DataSet.
One thing I encountered, however, is that DataTable.GetChanges() method will return something for nothing.
Let me elaborate.
When you assign a new value to a column, it makes the column "dirty". It's set dirty so that the DataSet object knows which tables/rows to persist. Here's a funny thing though. Maybe not funny but strange nonetheless.
If you individually examine whether a column that's been set is "dirty", it won't be so obvious that is has been changed. In order to see whether a column is dirty or not, I use the overload with DataRowVersion parameter:
!someRow["LASTNAME", DataRowVersion.Original].Equals(someRow["LASTNAME", DataRowVersion.Current])
So if you've changed the the value of the LASTNAME column, then the above will result in true and know that the column has changed. If you later check someRow's RowState property, it will correctly report DataRowState.Modified. But what if you set the value to exactly the same value? The above statement will return false but the RowState property will still return DataRowState.Modified. What gives? Now, this may be an intended behavior since you may want to explicitly set the column "dirty" for some reason. And that's how it works in classic ADO as well. I just can't figure out where this extra information is stored.
Also, when you are inserting a new row, there's no such thing as original values, so you can't use the above statement. Right now I end up having to enumerate all columns for a table rather than using only the columns that were explicitly set, even if they are null values.
I've used Reflector to great effect so far and this may be another time that I may have to do so. It's time-consuming but educational nonetheless... unless someone else already has an answer to this :)
Jeremy D. Miller brings up a point that I have been mulling over for many months now.
I am working in an environment that is transitioning - or need to transition from a procedural thinking to a more OO thinking. And I originally come from a OO environment (mainly java). I had to retrofit my way of development into a procedural way of design and programming and it was hard. I have since then found ways to adapt myself to use as much OO principles in my procedural environment and although at times limited, I think I have been pretty successful in my approach. (Think VB6/VBScript and OO, now transitioning to .NET).
I've always had GOF book but never really got into it until I found the Head First book. Everyone should own the Head First book.
And I admit it is difficult to use patterns. And I think it's because patterns are not a recipe that you can follow blindly but every situation is different and you have to adapt the pattern to your current situation. I am still learning and I am also surprised that I have been using some of the patterns described in these books but just didn't know the "lingo".
My problem is - I'm sure similar to many of you - that although I fully accept the benefit of OO and Design Patterns, I, many times, fail to explain to my peers - who are mostly procedural - why. I am wondering why myself but the concept of OO is very natural to me and to me, it almost is unthinkable to do it any other way. You can understand my frustration when I had to "adapt" to procedural style.
For any of you out there, how would you convince those who may or may not have learned OO in school but still do not understand why it's beneficial, and to use them in their everyday development efforts?
Does anyone else think it's kind of tacky? I especially don't like all these gradients. I just noticed some 3rd party tools are starting to employ gradients into their own products, maybe to give consistent user experience with VS.NET 2005. It's distracting I tell you and it does not add any value.
Toshiba has two brand new TabletPCs in their line-up.
I've never seen TabletPCs in real life but I love the idea of hoisting around a what's-essentially-a-digital-notebook in my hands and being able to do all kind of cool things with it. I tell you I'm just waiting for the price of the darn things to drop. And those two TablePCs are a good sign of things to come. I hope.
So, here's my rant.
Who designs these pieces of hardware? I mean in general, who's in charge of putting the feature list and the form factor, etc. together for a device, be it a laptop, PDA or TablePC? Every time a new device comes out, I am always excited at first but then I get disappointed by the lack of certain obvious things that should be there or some things that should not be there.
Now, these two TablePCs are what they call convertibles. You can turn and twist the screen around so you can use it like a laptop or a tablet. Pretty cool, eh? NOT! If I wanted a laptop, I would buy a laptop. Who wants to lug around a 6 lbs of metal and plastic in your arms? I certainly don't. I'd rather have a thin, light, and affordable TabletPC with no keyboard and no nothing. Just a screen and a pen, and me of course. That's all I need on the road and if I need serious sitdown time, I'd use a dock or something. That being said, if any TablePC manufactures are reading -- I doubt that very much, but oh well --, here's my ideal but reasonable setup for a TabletPC.
- Processor: I don't think I need a super-powerful processor here. If the processor is fast enough to recognize my pen strokes in real time and display the information fast enough, that's good enough. I am not particularly looking to do .NET development on the thing. See Battery.
- Battery: Definitely one of the most important feature for sure. The thing is if you want a bigger battery, your overall weight goes up. So you have to make compromises here I guess. However, without some of these excess extra components, we should be able to squeeze out a good 6+ hours of battery power, don't you think? Hurry up with those methanol or hydrogen batteries already!
- Hard Drive: Again, I don't need a huge drive. Can it store my documents and some pictures? 20GB should be plenty. Of course, if there is no significant difference in price, performance or battery life, bigger drives wouldn't hurt I guess.
- Memory: I'd guess 512MB(min) to 1GB(max) should be good. Again, no development. No video editing either.
- Screen: I'll be looking at the thing all day, so it should be nice and bright and have wide visible angles. I think the size can vary here but again I'm guessing bigger screen would draw more power. Maybe starting with 12” and going up to 15”? 17” would be nice but again, the battery... Hurry up wth OLED already!
- Connectivity: I would say, that the wireless connectivity should be there. USBs should be there. Not sure about IEEE 1394 though. Having a SD card or CF card slots would be nice. The three standard audio ports should be there. The video-out can be argued but not a big deal. The two toshibas have more than enough connectivity options and I can't complain much there. However, I don't want my TablePC to have too many “holes”. It just ain't pretty.
Notice that I don't have any optical devices listed up there. I think it's an overkill for a TablePC.
All other features are optional and should not be included. Put them on the dock. Most people nowadays have a desktop or a laptop at home since they are so cheap (some of the laptops aren't really laptops but a small-form-factor desktops, really). So I'm sure file transfers and even network installs or network boot shouldn't pose a serious challenge.
Now, here's a wild idea though. I am not a hardware junkie so I don't know if it's at all possible.
Notice I said that a powerful processor isn't needed for my TabletPC -- actually I said super-powerful but that's beside the point --, but it would be nice (read: optional) to have the necessary horsepower to do development or something like video editing. And let's just assume that you don't have another PC available or you just want to do it on the TabletPC machine, for some reason. All of that really doesn't matter actually. Let's just say you want to do that on your limited horsepowered PC.
What if your dock contained a processor? A processor or processors more powerful than what is found in your TablePC. So that when you dock your TabletPC, the whole setup will run in parallel as if you had mutiple processors. So you would have two processors running simultaneously to give you that extra boost you need to do whatever your heart desires. Or if that's not possible, here's a simpler idea. Upon docking, your processor in the TabletPC shuts down and the processor(s) in your dock takes over. I can dream, can't I?
Oh, also check out the new camera/mp3/photo m:robe 500i from Olympus. I like it. Now if that thing were able to play DivX, that would have been beautiful. Too bad.
Check this out. I fumbled onto the page but I had no idea Microsoft had a web hosting side of business. Who knew? Hmm...
Not sure what to make of it...
I found this post by Brad Abrams which states the coding styles used internally by Microsoft for .NET projects.
Although I don't agree with all of it, I must say I was surprised to see that I was more or less in line with them. I have a question though regarding the using statement being located under namespace block. First of all, I don't know the reason behind this; my initial guess is that it has to do with multiple classes per file issue. I don't have that issue normally. Also, VS.NET doesn't follow this practice. It puts using statements at the very top before namespace declaration. Does anyone know how to change this - through project templates or whatever - to have VS.NET insert using statements inside namespace block?
<rant>Also, although I don't care whether I use space or tab character for indentation since it's easily converted to and fro, I am annoyed that when I use 4 spaces and I hit backspace to go back out to the previous indentation level, VS.NET only deletes a single space, making me hit BS four times! What a travesty! Well, it's not that bad but I think if the editor is smart enough to insert 4 spaces for indentation, it should be smart enough to delete 4 spaces to outdent.</rant>
(I'm a little annoyed that I just lost the post I was typing for like 15 min. That's what I get for using the web interface!)
Writing software requirements is an arduous task. In my opinion, it's more of an art than a science. But then, what do I know, I'm only a coder.
In my projects, I'm currently having some difficulty with gathering and organizing screen designs/layouts. Usually for web projects, you have a web designer who creates a template or pages in their favorite tool. Then a developer like me puts the code behind them, making adjustments as needed. It may vary here and there but I think that's pretty standard practice.
How about winforms or rich client applications? I don't know of many requirements analyst that know how to use Visual Studio. So what are some of the effective ways of going about this business? Do you have designers create the layouts in their favorite graphics tool(photoshop?) and then you try to recreate it in Visual Studio as best as you can? Or do you have the "business types" learn just enough Visual Studio to lay out controls on a form? Or do you go as far as to create a custom mock-up tool? Previously, I had someone who used Excel to create the mock-up screen, which worked out ok for the most part.
Then there is that "sometimes-very-tedious" control show/hide logic. You know what I'm talking about. If field A is X, then field B should be shown, if Y, hidden. If field C is Z, then field D should list these certain values, etc. Annoying as these are, they are very essential to a good user experience. My initial thoughts have been to separate the layouts - physical coordinates - from their states - values, visibility, style, etc. Easier said than done though.
And when all this is done, how do you keep track of these requirements. Word document? Line items stored in a relational DB? An XML document? XAML might be the answer. But that's not here yet and I still need to work with VB6-era apps.
I'm also thinking whether this is going against the whole "agile" development process that's all the rage these days...
Do blogs you post using the company's machine and its network to your own personal blog become the company's? We know that all emails that go out or comes in through the company's mail server is candidate for company's review at will. That doesn't mean that the email you compose becomes the property of the company's or does it?
Although the post in itself may not be susceptible to this precarious situation, I am wondering whether the ideas or the code snippets contained within the post might.
What do you think?
Upon reading Udi Dahan's post, something clicked in my head.
I've been in a O/R mapping funk lately and could not clearly work through some of the dilemmas and I may have just figured it out.
Really. It's just a report on data - a read-only report: notice the "get me" and "show me" at the beginning. At that exact point in time, I just want to show some kind of report to the user, I don't need behavior filled domain objects. To tell you the truth, almost anything I show to the user doesn't need to be immediately backed by a domain object. Should the user choose to edit one of the customers, or add another category the product falls under, right then and there I'll go and get the ONLY domain object I need, and use it.
Really. It's all very simple. I don't know why I hadn't thought of that before...
You've read about this already I'm sure but I just can't believe it. I've heard some overtime stories but this is really crazy. This has got to be against some kind of labor law as the author states.
I guess I should feel very lucky working 40 hr/wk + occasional late stays. Even then, my eyes feel so very tired most of the time, sometimes unable to focus on anything which is kind of scary, and the chronic head/backaches. Not to mention that I may go sterile sitting all day long, according to my mom. I don't know where she read it but I believe her.
I am :

Which File Extension are You?
I don't even know what that means, man.
I followed the link from Mike Gunderloy's blog and found some info on the beta 3.
ActiveViews offered a Web-based report authoring and end-user query tool based on Microsoft’s .NET framework that was designed to exploit SQL Server 2000 Reporting Services. The product was intended for business users with no development expertise.
Microsoft rewrote the tool with a more Microsoft-like user interface and is renaming it the SQL Server Report Builder. Placing the tool inside SQL Server 2005's Reporting Services, Microsoft bills the technology as bringing self-service, ad hoc reporting capabilities to its ever-broadening SQL Server portfolio.
Another nail in the coffin for Crystal Reports?
I found the following quite funny.
Because of the proactive caching, developers will no longer have to understand the esoteric differences involved in deciding among Microsoft's ROLAP, MOLAP and HOLAP flavors of OLAP.
Am I alone?
Steve Eichert posted about Repositories and I've been coming across many situations in my projects where I would definitely benefit from such design.
However, one thing still bothers me and I can't seem to come up with a clear answer and that is regarding handling of aggregate objects. In the original example, there are two domain objects: Customer and Address. Each Customer can possibly have multiple Address objects which is not an unrealistic scenario. So then, as Shawn Oster and I asked in the comments, how would the loading of this aggregate object be handled? Would CustomerRepository call AddressRepository? So then we would have a method like FindByContactID in AddressRepository that will return a list of Address objects to the CustomerRepository which in turn will return the whole thing to the next layer up.
A problem I have with that is then what happens if I have Account domain object that has many Customer objects. Then calling AccountRepository.FindByID() would possibly trigger many other repository calls. For example, if an account has 5 customers and each of the customers has 3 different addresses, that's one call on AccountRepository, 5 on CustomerRepository, and 5 on AddressRepository. I am assuming each of those calls will end up as a single trip to the database. The whole thing can be retrieved in a single sql statement instead if we wanted. Obviously, there would be duplicate information returned but if we only retrieved, say, account name and contact name along with the addresses, it wouldn't be much. So then maybe AccountRepository.FindById() should run two sql statements: one to retrieve itself and another to retrieve all customers with all of their addresses. Is that necessary? But it surely beats running 5 or more separate queries. Maybe there should be a overload that accepts a flag - maybe something like “bDeep“ - that will either retrieve all or just placeholders.
Then I thought about lazy loading. How would this be achieved? In order for this to work, each property that represents a domain object must reference its respective Repository. That might be ok if the object remained in a single layer. Would you pass this object to the UI? But then I realize that these Repositories are not necessarily bound to the data access layer - maybe I'm confusing myself with DDD and tiered design(are they compatible?). Repositories on the UI layers(or the client side) can represent a proxy that references middle tier business objects (whether be it via remoting or web services). This actually is a pretty good design I think since then that Repository facade gives way to a smart client design where sometimes the client needs to go offline and still retain the data in a local data store.
I wonder how all this Repository stuff fits into Microsoft's new architecture from the P & P group.
Then there is the problem of how to handle different retrieval criteria. Should we create one method per criteria - FindByCustomer, FindByCity, FindByState, FindByLastNameAndState? Or do we create some other mechanism to specify the criteria, parse it, and create sql statements from those criteria? By the way, on a side note, this totally eliminates any possibility of writing a stored procedure for that case since we need to accommodate any combination of criteria. But this last discussion is for another day...
So this is my latest craze - SCAG, nyuk nyuk. I dig it. Ever since coming back from VSLive I am fascinated with this idea. One specific area that really interested me and I though I could immediately apply in my own code was UIP. It had never occurred to me that the presentation layer could be further divided into User Interface Components Layer and User Interface Process Layer. This would so help with my messy UI layer altogether, I thought. So I am currently investigating how I can utilize this idea albeit in a vbscript environment. Pity me...
You can find whole lot of helpful stuff at Microsoft Patterns and Practices site. I use a few of their application blocks myself including Data Access Application Block(who doesn't?) and Configuration Management Application Block. I use log4net for my logging needs and as far as I'm concerned, it's freakin' awesome!
So I write web applications. At first, I thought they were very cool. My first experience developing web applications was back at AT&T, my first real job :), using Cold Fusion. Before that I was writing "fat" client apps using Java and C++. Cold Fusion was pretty cool. With just some simple tags here and there, I could create whole lot of apps in minutes. And you know something? I didn't need to worry about deploying the app. All you needed was IE on client workstations and well, everyone had it automatically. I was happy.
Well, I'm not so happy any more. I just came back from VSLive NYC - a decent experience, maybe I'll talk about it in another post -, and one of the most influential sessions were on so-called smart clients. And I think I'm all for it. Seriously. We have extremely powerful client machines that we simply use as a dumb terminal basically. Why not tap into that resource? So the promise of the smart client seems to come from this feature called ClickOnce(coming soon). If this thing really works as promised, I don't see any reason why you wouldn't write your intranet applications this way.
In my humble opinion, the web wasn't meant to be an application platform. It was only meant to be a space where we can share information - documents - easily and readily. The web introduces levels of complexity that are simply unnecessary. I think that all developers should unite to write as little web applications - in any form, be it ASP.NET, ASP, php, JSP, Struts, Cold Fusion, CGI or shtml, etc. - as possible! Did I mention javascript sucks? I don't hate the language per se. I just hate the fact that I have to use much of it when I'm writing a web application to deliver even a mediocre user experience. And with the advent of all these new and ever-changing W3C specs, you gotta be Einstein to keep up with all of this.
I am hoping that with ClickOnce and even XAML in Longhorn timeframe, we can almost completely eliminate web applications. By the way, I love the idea of XAML but I'm sure you already know that its idea is not new ;)
I've only been working with .NET for only about a year now. I've mostly been a VB/ASP developer and before that Java. I dabbled in perl and shell scripting on Solaris and HP-UX. I was dissatisfied as a VB/ASP developer coming from Java environment - I loved Java! since 1996! - but I have to say that I am very excited and enjoy programming in .NET, perhaps even more so than Java.
I actually have a pretty good experience with Java including Servlets and EJB. I jumped ship when JSP technology was just introduced.
My day job though is split between developing custom MSCRM and SalesLogix solutions. I work at Infinity Info Systems, a SFA/CRM consulting firm based in NYC. MSCRM, for those who don't know, is Microsoft's own CRM application built on .NET framework with SQL Server in the back and ASP.NET as it UI. So I'm having a little fun with that. SalesLogix is a client/server CRM solution by Best software and is mainly targeted at mid-size enterprises. Its development environment is basically vbscript with limited form support. It provides its own OLE DB Provider for the client apps to talk to its database, so ADO is the main staple. Although I could write .NET apps against this provider, that would mean my application has to sit outside of SalesLogix and most of our clients want everything to be enclosed in the database itself.(SalesLogix stores all of its forms and scripts in the database)
First post! First post!
Ok, I'm not exactly sure what I'm going to be writing about... let me think about this for a bit.