 |
|
 |
I was thinking about a scenario which is often seen. Let's start form the user perspective. He opens a web page and there is some data table and filters like that: Filter by: equals <input value here>
User chooses a field name and enters some value and submits that.
Web application (presentation layer) takes user input and transfers the request to the web service (using automatic .NET XML serialization). So it seems data transfer object pattern can be used here.
Then my web service transforms that DTO to some valid query. Let's assume we are using some OR/M tool to query it for objects which satisfies the query. Also let's assume that OR/M tool offers some easy way to construct dynamic queries (BTW, LINQ-to-SQL has some problems with this).
So the question is - how to better pass data from user form to the data access layer (OR/M tool) so the dynamic query could be generated with less hassle? It would be awful to have web method for each field like this: GetCustomerByName(string name), GetCustomerByCity ... and so on. Then I have to analyze the user input and call appropriate web method. But maybe it is the right way?
I prefer some method GetCustomersByFilter, so then I can almost directly pass the request to web service and then can convert the request to query in OR/M servicing component. But what to pass to this GetCustomersByFilter method? Dictionary with field names as keys? Many nullable parameters? Custom objects?
It would be nice to use the same data structures that are used to pass data to the web application - the same data transfer objects, I guess. Like this: Customer[] GetCustomersByFilter(Customer filter);
but then I have to allow all the fields of Customer to be nullable so I can later see which fields are used as filters. And if that does not correspond my business/validation rules (if rules say - some property cannot be null) than it would be a bit confusing. Also if I would like to use some generator to create web forms based on my DTO objects, it would be impossible to mark required fields easily just by detecting if some field is nullable or not.
So maybe I need some other object, like CustomerFilter with all nullable fields? Wouldn't it be overkill to have two classes for each object (also, accounting that those DTOs are converted to domain entities later - then we have even more classes)?
This dynamic filtering issue is really bugging me. Has anybody any experience with that, especially using domain driven design?
Thanks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi all,
I've started designing a document management system based on SQL Server and vb .net. I find this an interesting project, why? Document management systems have grown to be too complex. What are the main subjects to cover? I want to control the document flow through a product development project, then to the production cycle and maintenance. This means avoiding a catalog structure and always looking for the latest versions of CAD data, bill of materials and so on.
It would be nice to have some feedback, is this a good idea?
Best regards,
OAT
Norway
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Sharepoint is flexible, and, I find relatively simple to utilize and learn, plus there are TONs of examples, source code, add ons, and it's industry standard, uses SQL Server, can use .NET plugins, and more... Seems kinda like a moot effort to write your own.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hello to all.
I am hoping you can provide opinions based on real world experience as to whether developers need to have local administrator rights on their machines or whether they can run on lower authority and if so what the recommendations for the minimum settings to use would be? More details around the environment follow ...
Our organisation is large enough to have separate systems administration and development teams. The organisation has a Standard Operationg Environment (SOE) that is used for all general office workers. Our developers currently have local administrator rights on their standard logins. Due to some recent scares with viruses coming into the network the systems administration team is making a case to management to have the developers normal login accounts run at a similar privilege level as the general office workers and either: - provide them with a second account to use to load / remove software - request that they go through the service desk to get software installed
The overall environment is Windows XP with MS Office 2003, Outlook 2007 and some other tools. The development environment is .Net, C#, SQL Server 200/2005 and a variety of other tools.
Over to you ... what are your thoughts?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Well - if you run with elevated privileges, you're kind of assuming that your applications are going to be deployed on systems that require elevated permissions. If your applications are meant to run in a lower security level then you've just made it harder for yourself to test that your application will run in the environment that you want to use.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes. My blog | My articles | MoXAML PowerToys | Onyx
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
 |
Thanks for the answer.
The vast majority of the applications being developed are web based. There is some middle tier components also developed using the .Net environment. We can operate on the basis that the deployments will run with appropriate security set and / or the correct impersonations being done. The appropriate security is highly unlikely to be anything like local administrator on the platforms that the application is being deployed to. In fact I suspect that it may be argued that running at lower privileges may enforce the correctness of the impersonations.
So my question extends out to cover: what would break if the development tools were run on a machine where the user was not running with local administrator privileges? Conversely what setting would need to be made to allow the development tools to work correctly without having to provide local administrator rights?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Pete makes a good point. I can't speak specifically to web applications, as you mentioned in your other post, but I have to agree that giving admin rights would encourage bad habits.
You don't, however, want to sandbox the developer too much. If you start blocking things like write access to the "Program Files" directory, you'll just have a bunch of angry geeks on your hands. The users may not need to touch that, but the developers will want to be able to test installers and such.
On the other hand, if you're ONLY doing web development, a complete lockdown might be possible. It would depend on exactly what's needed to run the IDE, compile, and deploy a web app... I'm sure someone else can give a more complete answer on that subset.
I would suggest, however, that you put a process in place for developers to request temporary admin access when necessary.
For example, I'm a front-office developer in a large company with a separate IT support staff... I can write freely to most of the hard drive and the registry, but I can't change system or security settings, or kill admin-level processes (Such as the scheduling app they use that occasionally makes my machine unusable for 20-30 minutes)... My only major gripe is not being able to run a defrag without asking one of the IT guys first.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks for the comments.
I take the point about the temporary admin access and our IT area were thinking of either: - providing the developer with a second account to use to load / remove software note: this account would not be connected to email, etc. and so could not be used full time to replace the main account - request the developer go through the service desk to get software installed note: software installation e.g. tools and other apps, is a fairly rare event in our environment
Your example is interesting. Do you know if you are set up as local administrator with group policy applied over the top to restrict your access to security, etc?
I look forward to other people's feedback as to minimum requirements for the IDE. 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
No, I'm not a local admin... Hence the inability to run a defrag. I think I'm in there as a "Power User"... Hard to tell, as I can't access the users/accounts config.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
If you want faster development yes. Every time you put up a wall you slow down progress. Reverse the question and ask: Is it really a problem if my developer has admin access on his local machine? I mean, is it the development team that is bringing in these viruses/bad progs? Developers are usually pretty computer savvy, so sometimes I find this argument hard to swallow. Maybe anti-virus would be a better solution than locking access?
If you can't think of why this would be a problem, then why put up roadblocks? Here, your suggestions are wholly adding to the cost of development, and decreasing efficiency. Are viruses that prevalent in your network? A user can be an admin on their machine and still have restricted access to other machines, and that may be a more viable solution.
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
I have a data model where each record has a "next version pointer" to track updates to the items. As it stands now, the object looks something like this:
Public MustInherit Class VersionedDataObject(Of T As VersionedDataObject(Of T))
Private _next As T Public Property NextVersion() As T Get Return _next End Get Set(ByVal value As T) If value Is _next Then Exit Property _next = value
If _next Is Nothing Then _nextVersions = Nothing Else _nextVersions = New NextVersionIterator(Me) End If End Set End Property
Private _nextVersions As IEnumerable(Of T) Public ReadOnly Property NextVersions() As IEnumerable(Of T) Get Return _nextVersions End Get End Property
End Class
The question is, when NextVersion is Nothing, would you return Nothing from NextVersions (as I am doing now) or an IEnumerable with no items?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Why don't you look at what .NET does itself, e.g. the methods operating on a Queue, such as Dequeue.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Not a bad idea. My object does not directly implement IEnumerable like Queue or List (and isn't a 'collection' type of object), so I'll have to look for other objects to find some examples. For now I think I will go with suggestion from the other response.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I would return an empty enumerable from NextVersions. That way, the consumer of this property does not have to include a test for whether the IEnumerable is Nothing, but can just go ahead use it. If it's empty, then the iteration over the enumerator will simply do nothing. That makes life simpler for the person using your VersionedDataObject and takes away the risk of getting a NullReferenceException when someone forgets to check for Nothing. So, you can just do something like:
For Each version In myVersionedObject.NextVersions ' do something with version Next
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
 |
I think I will go with this approach. Like you said, it gives less room for error ("pit of success" and all that).
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The concept of Run to Completion means, at least as it pertains to classes, that a method must run to its end before another method can be called on the same object. Adhering to this rule makes it easier to reason about a class's state.
I've often seen examples of this rule being broken or just ignored. How often does a class call one of its methods in the middle of another method? I've done this many times, and I've seen code authored by others do the same thing. As long as the method being called is read-only, I don't think RTC is being violated. But when it's a write method, I've wondered if this isn't an indication of a code smell.
I was looking at Sams Teach Yourself Object Oriented Programming in 21 Days. In the book is a step-by-step example of designing an object oriented blackjack game. Here's an excerpt of part of the code from that example:
public void play(Dealer dealer) { while(!isBusted() && hit()) { dealer.hit(this); } }
public void addCard(Card card) { hand.addCard(card); notifyListeners(); }
public boolean isBusted() { return hand.isBusted(); }
public void hit(Player player) { player.addCard(cards.dealUp()); }
There's a circular nature to this design which doesn't sit well with me. But setting that aside, what I want to get at is what the player class is up to in the play method. This method passes its instance to the Dealer which in turn calls the Players addCard method. This method adds a card to the player's hand. Back in the play method, the loop checks to see if the hand is busted. It's depending on the Dealer to make a change in its state elsewhere.
I don't know; maybe there's nothing wrong with this approach. It just seems fragmented to me. The play method is depending on state changes made via another method that it expects to be called while it (the play method) is still executing.
I'm not sure how I would approach this, but I was curious as to whether anyone else sees anything wrong with this.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
We have an application which is run as a Windows Service. This application uses a dll that implements some business logic.
The service is running fine and now we have implemented some new business logic in this dll. None of the other dependencies have changed. The application remains unchanged. My question now is:
Do we have to recompile the application and reinstall the service? My personal view would be NO. Am I right?
A quick feedback would be much appreciated.
Thanks/RB
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
1. If the service will find every function with the same parameters, he will need, in this dll, then you do not have to recompile or reinstall the service. It should run as before.
2. If you change some code of the dll, so that you have to change the code of your service. Its normally enough to recompile the service. You do not have to reinstall it.
Greetings Covean
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
My requirement is the remote application sends some 15000 to 20000 messaages to be processed and the remote application happens to be done using microsoft technology then the remote application can directly add messages to MSMQ and then using the MSMQ adapter of BizTalk the messages can be picked up for further processing.
As MSMQ is used for In-Order delivery but at the same time it does not require the other application to be online that is if the messages coming are too much as mentioned above then they can very well sit in the qeue and wait for it to be picked by the MSMQ adapter, so I guess my driver here along with the ordered delivery messages it is also the number of messages coming and processing the same.
So, I was thinking of having MSMQ, so that the remote app can send the message to the MSMQ and the Biztalk would pickup the messages using the MSMQ adapter for further processing. Please share your thoughts ... or is there a better option to handle this scenario, please do reply
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Please do reply back of what you think about the approach or is there any better approach to cater to my requirement.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I am in the process of designing a typical financial software package. I have googled to try to find sample designs I could benchmark against. I count not find any. Does any one know any links that show sample designs of financial software. It might contain data flow diagrams, or uml diagrams, or sample user interfaces.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Hi all.
I am writing some paperwork about Object Relational Mapping / Data Access Layer development technnoligies and tools (like Microsoft ADO/DAO, LINQ to SQL, Entity Framework, (N)Hibernate, Doctrine, Apache iBatis and other SQL / CRUD generators and mappers). I would like to know other programmers' thoughts about the subject so my work is not based only on my own subjective opinion.
If someone here has experience with ORM / DAL tools (or have created own ORM / DAL) then I would be grateful to know about your findings. I can suggest some factors that you can take as a basis:
learning curve - how hard / easy it was to get into this technology, how long did it take; was the quality of the documentation appropriate?
introducing the technology into an existing project - how long did it take, was it hard, what problems did you encounter? Where there any problems - "deal breakers" that made you choose not to use some certain ORM ?DAL development tool?
starting a new project and choosing the ORM / DAL technology - how much the ORM ?DAL dictates the rules for an architecture of the new project? where there any compromises needed just to adapt your project architecture to the ORM / DAL technology?
porting some project to another data base / working environment - how did ORM / DAL tools help or create additional issues?
flexibility - if project specifications changed, how the ORM / DAL reacted? Was there any need to throw away existing ORM / DAL and choose another or create your own layer from scratch?
And considering all the above, what would be your ideal ORM / DAL tool, what features should it have and what should it avoid? Do you prefer high abstraction from SQL or maybe a tool that generates modifiable SQL / CRUD that you can tweak later and also the changes do not get lost when you use the tool to regenerate something?
And other useful ideas about this topic are welcome.
Thanks.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |