.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

MVC too complex?

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

I believe lot of people will disagree with me on this one. But the MVC model sucks. The reason:

1.       Over complicated;

2.       Cannot handle complex UI;

3.       Hard to debugging as code scattered all over the place.

View Complete Post

More Related Resource Links

How do I persist custom complex types in design-time


Let's say that I've got one custom webcontrol called MyControl.

public partial class MyControl: WebControl {
public IComplex Complex { get; set; }

The control is a very simple control but it holds an instance of a complex type that is accessable through a property. The property has the propertytype IComplex

public interface IComplex {
string Name { get; set; }
List<IComplex> Children {get;}

Let's say that I am able to pick one of several different types of object that derives from IComplex in design-time and assign it to the controls property "Complex" property.

Naturally I would like to persist this information to the HTML-View in a user-friendly way.

Because we don't know what type the user has picked there is no way to instansiate the type if we don't persist the name of that type. The Type could also contain more properties than the Interface the controls property is refering.

<cc1:MyControl id="MyControl1" runat="server">
<Complex> <!-

Input Validation: Enforcing Complex Business Data Rules with WPF


Windows Presentation Foundation has a rich data binding system that includes flexible support for business data validation. We take a look at implementing some complex data input validation scenarios that include customized data errors for users.

Brian Noyes

MSDN Magazine June 2010

Text Rendering: Build World-Ready Apps Using Complex Scripts In Windows Forms Controls


The System.Windows.Forms.TextRenderer class provides support for complex scripts in Windows Forms controls so you can render text the way you want and support international locales.

Miguel A. Lacouture

MSDN Magazine March 2006

Super Complex Table/Matrix



I'm in a situation where I have to build a super complex table or rather matrix

This is how the table/matrix should look like: 




The complex thing is that everything is taken from a database.


I will try to explain the color sections one by one.


SERIE (Green area)

If we start with the top columns; SERIE 1, SERIE 2, SERIE 3

These values are coming from a table column value. If this column has the value 3 then I will need to print 3 table cells, just like in the image.




Then there is the outer left columns, that goes like this;

Behandlingsdag (meaning day of treatment)

Osplatin (100 mg/m2)

Leucovorin (x)

And so forth.


All these values are also coming from 3 different tables



One Column (Yellow area)

These cells are getting their values from a table. According to some true og false values.



1, 2, 3, 4 (Red area)

Then there is the table cells below the SERIES. These table cells goes like this

First there is a 1, then there are the tables cells 1 to 18 all below

Binding of complex entity turns into validation error

consider classic example: Product and Category editing Product in dropdown Id of Category is selected - Category mapped as object with all fields empty except Id when submitting Product edit form - validation gives an error: "Category name is required" (I have Required attribute on Category Name property) How deal with such errors if I want to use built-in validation (if (!ModelState.IsValid))? Writing custom data binder which would fill all such id-only-objects with values from database comes to mind.upd: I did small research of mvc code and found out that validation happens before binding - so this solution would't work. Do you have any other solutions for this problem?

Joining complex SQL tables

Hi, I am new to SQL query. I would like to join two SQL queries (MS Office Query and Computer Details Quer) into one. The tables output can be found at http://rapidshare.com/files/412281201/SQL_query.zip Or, from lsoon3@gmail.com Thanks for your guidance, below are the query:  1) MS Office Query: ================ select v_Add_Remove_Programs.DisplayName0 AS [MS Office Edition] from v_Add_Remove_Programs where DisplayName0 like 'Microsoft Office Project Professional%' OR DisplayName0 like 'Microsoft Office Visio Standard%' OR DisplayName0 like'Microsoft Office Visio Professional%' OR DisplayName0 like 'Microsoft Office Enterprise%'OR DisplayName0 like 'Microsoft Office Standard%' OR DisplayName0 like 'Microsoft Office Professional%' 2) Computer Details Query: ======================= select  distinct  v_R_System.ResourceID,  v_R_System.Netbios_Name0 AS [Computer Name],  v_R_System.Resource_Domain_OR_Workgr0 AS [Domain/Workgroup],  v_Site.SiteName as [SMS Site Name],  [Top Console User] = CASE  when (v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.TopConsoleUser0 is NULL or v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.TopConsoleUser0 = '-1')  then 'Unknown'  Else v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.TopConsoleUser0  End,  v_GS_OPERATING_SYSTEM.Caption0 AS [Operating System],  v_GS_OPERATING_SYSTEM.CSDVers

How to debug a complex function?

Hi everybody, I got a few complex functions written by my colleague to review. These functions calculate cost of goods using one of the methods (passed as a parameter) (FIFO, RWAC, LAST cost). I've been looking at these functions or running some queries based on these functions, but I'm yet not sure I understand them fully and their logic. What is the best approach for me to test / understand these functions? Thanks in advance.Premature optimization is the root of all evil in programming. (c) by Donald Knuth Naomi Nosonovsky, Sr. Programmer-Analyst My blog

Writing Complex XML from DataSet

How can i use Dataset.WriteXml to write complex xml correctly?   I have an XSD.  i am adding data to the different tables inside of it. When i run the Dataset.writexml and store it to a location, the xml looks like this? - <Envelope>   <Username>****</Username>   <Password>****</Password>   <ClientVersion>2.1</ClientVersion>   <ClientTrackNum>3298509321744</ClientTrackNum>   <SessionId>4J023JMCASOR923KCM23AS24FV</SessionId>   </Envelope> - <DocGenBy>   <ProductName>M.Key</ProductName>   <ProductType>M.Key</ProductType>   <ProductVersion>M.Key</ProductVersion>   </DocGenBy> - <StoreInfo>   <Id>231</Id>   <Technician>tp1</Technician>   </StoreInfo>     When i run Dataset.writexmlSchema it writes the schema correctly.   - <xs:element name="Envelope"> - <xs:complexType> - <xs:sequence>   <xs:element name="Username" type="xs:string" minOccurs="0" />   <xs:element name="Password" type="xs:string" minOccurs="0" />   <xs:element name="ClientVersion" ty

data contract code generation for large/complex schema (HR-XML/OAGIS) - is there an alternative?

Hello, and thank you for reading.I am implementing a Service based on a predefined specification (HR-XML 3.0). As such, I am starting with the schema, and working my way back to code. There are a number of large Schema documents (which import yet more Schema documents) related to my implementation, provided by this specification.I am able to generate code using xsd.exe, by supplying the "main" and "supporting" xsd files as arguments. But there are several issues, and I am wondering if this is the right approach.- there are litterally hundreds of classes - the code file is half a meg in size- duplicate classes (ex. Type, Type1 - which both represent the same type)- there are classes declared as inheriting from a base class, but that base class is not generated/definedI understand that there are limitations to the types of Schema supported by svcutil.exe/xsd.exe when targeting the DataContractSerializer and even XmlSerializer. My question is two-fold:1. Are code generation "issues" fairly common when dealing with larger, modular xsd files? Has anyone had success with generating data contracts from OAGIS or HR-XML schema?2. Given the above issues, are there better approaches to this task, avoiding generating code and working with concrete objects? Does it make better sence to read and compose a SOAP message directly, while sti

Database vs XML for complex changing data

Hello, I'm researching and experimenting with aspects of a new project before final design.  It will be in two parts: 1. a designer interface (like visio)2. client to display the content created within the designer interface. We have the design outline in place, the client will be in many forms, via the web using Flash or Silverlight (depending what's installed) and via windows using a WPF application. I would like to know what people think regarding storing information from the designer, all the clients will need to access the information via the internet so a database storage solution seems the first choice. But another alternative is exporting the information from the designer in something such as XML and storing that as a physical file. The designer will be an application allowing the users to create multiple pages (like PowerPoint slides), each of which they have control over placement objects (images, text, buttons etc). A database approach will require a lot of work when changes are made with update, delete and inserts every time a page (slide) is changed. The XML approach seems easier to manage because each time the page (slide) is amended the XML file can either be delete and recreated or the content inside replaced with the new designer layout. It would be great to hear what other people think. I was thinking for XML to separate each slide into a separate

MDX query performance is slow for complex logic implementation in Calculated Members.

We have implemented a calculated members which involves multiple calculated members  called in a nested e.q. Cal1 calls Cal2 and Cal2 calls  Cal3  and Cal3 calls Cal4 .  And when browing Cal1 through Excel it takes around 30 mins for getting result from a Partition having row count around 5 million. Follwing are the information on the scenario I am having: We are having partitioning in the cube. one partition contains around 4-6 million records Processers on Query Server: 4 quad core RAM on the Query Server: 64 GB Calculated members having simple calculation logics are giving results in no time. There is a Calculated members which calls 6 intermediate calculated in nested way and with small Data Set like 5-6 k rows it is running fine.   Any help will be much appreciated.   Regards, Sandeep

Cannot crawl complex URL's without setting a site-wide rule to 'crawl as http content'. Help!

I have pages within a site that use a query string to provide dynamic data to the user (http://<site>/pages/example.aspx?id=1). I can get the content source to index these dynamic pages only if I create a rule which sets the root site (http://<site>/*) to 'include complex urls' and 'crawl sharepoint content as http content'. This is NOT acceptable as changing the crawling protocol from SharePoint's to HTTP will prevent any metadata from being collected on the indexed items. The managed metadata feature is a critical component to our SharePoint applications. To dispel any wondering of whether or not this is simply a configuration error on my part refer to http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/4ff26b26-84ab-4f5f-a14a-48ab7ec121d5 . The issue mentioned is my exact problem but the solution is unusable as I mentioned before. Keep in mind this is for an external publishing site and my search scope is being trimmed using content classes to only include documents/pages (STS_List_850 and STS_ListItem_DocumentLibrary). Creating a new web site content source and adding it to my scope presents 2 problems: duplicate content in scope and no content class defining it that I know of. What options do I have?

Complex DataGrid ComboBoxColumn

Its 2010, .Net 4 is released, and the DataGrid is supported by now right?  Anyway.  Using much research I have successfully created a WPF DataGridComboBox Column that can: 1. Load a list of reference data, display the name column (instead of the ID column), and pick from the list. 2. Allow the user to type into the text box section and have the list auto complete from the selection 3. Capture events along the way such as TextBox.TextChanged (which does me no good with my current senario). I have 1 more requirement, that I can't seem to get past.  The user may type something not in the list, and after the user is done, I want to fire off an event that I can capture to create a new record based on the data (which is string, not ID).  I don't seem to have any validation issues because of this:  When the item typed in is not in the list, the default behavior clears out the TextBox, and moves on (with it blank).  Here is my working DataGridComboBox: <DataGridComboBoxColumn x:Name="ClearanceFileColumn" Header="Clearance File" SelectedValueBinding="{Binding Path=ClearanceFile}" SelectedValuePath="ID" DisplayMemberPath="FileNumber" Width="100*"> <DataGridComboBoxColumn.ElementStyle> <Style TargetType="ComboBox"> <Setter Property="Items

Sharepoint Approval Complex Workflow Requirement

I have a very complex requirement of workflow to be developed. Here is it... There is a Sales Order form which user fills in. This form should have a header section which is static. Body section consist of questions which should be configurable. There are 2 answers to such questions. 1. Standarad & Other Exception. If user selects exception then more number of fields should be displayed which again should be configurable. For every exception answer to the question, there should be a provision to configure approver with a certain Role... e.g. GM, Controller etc.. This role would then have actual approvers who can change any time and as a result need to be again defined in config database. Again they would be based on the Business unit that form is filled in. Finally more questions can be added by admin which creates a new version of the form and from the day its released, all new records should show new versions however old should continue old. What would be the best sharepoint solution approach for this requirement?

strongly typed view - Complex Model

I have a class ProjectDetailModelView with       ProjctDetail (fields to display)        UserList - SelectList (for dropdown control)I pass in  Inherits="System.Web.Mvc.ViewPage<glossaryDB.Manager.ProjectDetailModelView>" %>       And I want to use something like the following:<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">    <h2>Project : Edit</h2>     <% Html.EnableClientValidation(); %>    <% using (Html.BeginForm()) { %>        <fieldset style="padding: 1em; margin: 0; border: solid 1px #999;">            <%= Html.ValidationSummary("Broken stuff:") %>               <%= Html.EditorForModel() %>            <input type="submit" value="  Submit  " />   

Use WPF or build a complex service?

I am mainly a web developer / silverlight developer, but have a new project which has a requirement for it to run locally and not require a webserver. Our clients are wide spread when it comes to technology, from advanced users to people who use their mouse pad only as a coaster for their coffee cup. Cause of this I need a simple install and setup. There is possible room for us to do the initial setup / install ourselves. Since I know Silverlight pretty well and live in the .net stack WPF stands out as the direction to go. The initial project is for the "program/service" to basically go out to a database (database configuration has to be setup at install, as we won't know what type of database or how it is configured) and grab data from a specific table, create an xml / json file/email with the data in a particular structure, then send the email (possibly without the use of a smpt client) to a server where the email will be parsed and ran through a set of processes. The idea is for this to happen at set times throughout the day, and there needs to be some checks and balances. For example: we want to ensure there was a successful "send" and that we are not sending garbage data, in the event the data table has improper data in it, or is missing data. Also will be dumping sent data out of the database on regular intervals. All of this is to be automated o

Multiple viewports onto a complex control

I have a canvas with a big 2D image and some controls overlayed onto it. Each control is in fact a panel with many little buttons and text fields etc. I would like to have multiple viewports on the image, each one zooming in on one of those panels. AND each viewport must allow the controls that it is "zooming on" to react to user input. This does not seem possible as a Visual can only have one parent. I've seen a couple posts on here about Model3Dgroup being able to have many parents, and Viewport2DVisual3D, but for now, my stuff is all 2D so I don't think they would be useful (plus I can't say the posts are clear about solution, I'm rather new at WPF). Any help greatly appreciated.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend