Tag Info

New answers tagged

0

Regarding the validation aspect in Web Api - It is possible to do "model validation" and respond with a 400 bad request http response. Refer http://stackoverflow.com/questions/11686690/handle-modelstate-validation-in-asp-net-web-api/25050285#25050285


1

I believe your issue is you are trying to instantiate a jQuery UI dialog and not the kendo window. Try something like this. $('#ModalWindow').kendoWindow({ width: "500px", title: "Your Title", content: "content.html" }); Kendo UI Window Demo Page


4

a) You are performing an 'Introduce/Extract Parameter Object' refactoring. b) I cannot say if you will regret this or not. If every single instance of this requires services s1-s3 without exception, then this looks like a good refactoring. This can open the gate to undesired dependencies if you are not careful with your parameter object. Try to avoid ...


1

There's nothing inherently wrong with this. In the past, I've had several cases where it has been more logical to add a SomeClassCreateInfo class in to the picture, rather than passing parameters. So when to do it? This is an inherently more difficult question to answer, and it becomes largely situational. Usually it becomes obvious when a ...


1

If its common to many controllers and you use it in a lot of places, sounds like you need a baseController that your controllers can inherit from, and then put that logic there. If you do that, you don't need to pass unnecessary arguments to your actions, and your actions don't need the same code copy pasted everywhere.


1

I've seen lots of patterns like this, and generally they're good - superficially they seem complex and awkward but they do provide a good way to avoid repeating very similar data access blocks. I do agree that concatenating the data returned in the DB is a bad idea and the 3 fields should be returned and concatenated in the client (assuming it still needs ...


-1

a way of 'genericizing' information from a database so that all his web application's drop-down lists can share the same object in his MVC.NET C# code and Views, which can contain different data depending on what tables it is being used against. So, we take a DB schema that generally maps to the problem space at hand, and a user UI that generally maps ...


2

EEK... nooo my friend, hiding controls is the last thing you should do. If your using MVC, and I assume (Judging by your description) the Model Binding syntax, where your forms are generated using Razor and the HTML Helpers, then your already half way towards letting MVC do all the work for you. There are 2 main strategies when it comes to ASP.NET MVC. ...


8

I'm going to start flat out by saying after more than 30 years experience writing software and working in I.T in general, I have NEVER, EVER yet found a good reason for concatenating data coming out of a database. You could be putting 90% of your application code in the DB infrastructure, and doing all sorts of magic things with it, and I still would not be ...


0

Three words that should strike fear in the hearts of all programmers 'complex security scheme'. Whilst his scheme may be the best security implementation ever written, it's just as likely to be full of holes. I would always go for simple is better, even if it means writing a bit more code. Even the best code has bugs and if its to be used in government ...


16

This sounds suspiciously like an inner platform. Here are the potential problems: You'll be writing queries that query the database for what information to query (metaqueries) first, rather than queries that simply retrieve the needed information. You'll be subverting the role of the database, which already provides metadata capabilities such as rows, ...


0

The one solution I have come up with is to create "View" Models. I create simple versions of the database models that do not include the reference to the parent class. These view models each have method to return the Database Version and a constructor that takes the database model as a parameter (viewmodel.name = databasemodel.name). This method ...



Top 50 recent answers are included