Hot answers tagged

13

Building a web application is absolutely more complicated and harder to build than client-server, for a given set of features. There are a variety of reasons and ideas I'll describe in no particular order. The highest voted question of all time on this site is What technical details should a programmer of a web application consider before making the site ...


11

A Func is just a special kind of (well a family of, really) delegate. Naturally, C# would be turing-complete even without them, so of course nobody "needs" them, it's just that they make a lot of things A LOT simpler design- and syntax-wise. They take on a similar role to function pointers in languages like C. It's basically a way for you to decouple ...


8

These are not two distinct, different types - System.String and string are not equivalent types, they are simply two aliases to the same type. The choice of using one or the other is thus entirely stylistic. One project or programmer might say "int is the native C# term. It's short and clear and intuitive, and thus I will always use it". Another might say ...


7

No, not necessarily. What you need to understand is that the Web architecture is a Client-Server architecture, it's just that the Client here is provided for you (the browser). The real question is, does the browser meet your requirements? Can it perform all the operations you want of the Client? If so, it may well be easier to re-use that existing Client. ...


5

First note: I agree this should probably be a class. For a struct, though: Is it possible to change the design? In LimitedString's case, it sounds like 0 is perfectly fine: a string with no characters. You can't enforce anything with a default constructor (like you suggested in #1) because structs (in C#) cannot contain explicit parameterless constructors. ...


4

Video players have what I call a "threshold of computation;" there exists a minimum level of data flow (for a given video resolution), below which a video player will not work at all (or will only work intermittently). To support writing a video player successfully, a programming language would most likely need: Relatively high performance, Bit ...


4

Since the output will be exactly the same, this is a pretty subjective choice. If you know the application only ever will run in one specific culture, then I would say leave it out for simplicity. But if the application might be ported to multiple cultures, I would say leave it in. Even if you know all cultures you port to all have the same integer ...


4

Unless you have a really, really good reason that this has to remain a Struct, I would recommend that you convert it to a Class. That way, initialisation is completely under your control, through the Constructor(s) of that Class. If you really can't convert it, then I'd suggest creating a Factory Class to "construct" instances of this Struct; that class ...


3

In my experience it doesn't have to be more expensive to write a web application. We recently did some research to decide what approach to use for our own future projects. From developing a lot of windows applications we decided to move to web applications instead. In my opinion there are a few big advantages for using a web application. Often more easy ...


3

In your situation, I would probably write a few small utility programs that can iterate though your stored source code and list which programs reference which dlls. For example, in VB6, the .vbp file lists which dlls are used: Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation ...


2

I recently just started looking at Func in C#, and as far as I can tell, they pretty much are the same as methods, which is fair enough. Funcs (and Actions) are objects. Methods aren't. In an object-oriented language, where everything you do is done by manipulating, constructing, passing, returning, and storing objects, something not being an object is ...


2

A lot of times, you can really clean up a problem like this by expressing your data in a form with less syntax than a programming language, such as a CSV string. I don't know C#, but an example in Scala is: def headersForDataSource(dataSource: String): Option[Array[String]] = { val headers = """ Source1,header1,header2,header3,...,header18 ...


2

If the code doesn't change when converting from one project to the other, do I even need the original project. Can't everything just move over to the portable project and everything that references the old project can safely be updated to the portable project? (even nuget references?) The above question is the answer to the question below. If my ...


1

What is the issue you're trying to fix? If you're looking to improve performance, then this is definitely a case of premature optimisation. Any of the three methods you give could fill a list with thousands of items in the fraction of a second it takes to lift your finger from the mouse after clicking on a button. If you're just trying to make your code ...


1

You also can avoid switch and if using maps. I'm going to use Java syntaxis, but I guess it could be done in C# easily Unmodificable (static or constant) Descriptor Map<String,String[]> HEADERS_MAP = new HashMap<String,String[]>(); HEADERS_MAP.put("Source 1",new String[]{"header1","headerN"}); HEADERS_MAP.put("Source 2",new ...


1

You have to take into account also: Security, you need in any case protect your application against any threat and in this regard Web-based apps have the disadvantage because they are exposed to the Internet which is and will never be a secure place. It is important to specify the security features required for the system and if you are going to use a cloud ...


1

No - web development is very competitive with native app development. Overall architecture: Most modern fat client applications communicate with middleware, rather than directly to the database. With .Net the middleware is typically a SOAP web service. Many modern web applications are single page applications. In this architecture, a JavaScript client ...


1

Even if you never intend to run on another system or in another culture, once that fact changes, and you may be surprised how often that happens, stating the invariant culture in this case marks your intent, which will help future maintainers of your code, whom might be yourself. In other words; if being implicit doesn't properly convey your intent, be ...


1

I would say yes. The problem is even if the people are all in germany that doesn't nesacerally mean they will be running german versions of windows. People immigrate and sometimes bring their computers with them, people run english versions of windows because other software is broken on german versions of windows. As you say this is not too much of an ...


1

tl;dr; Yes, it is possible. But I doubt you will be able to support high-quality high-definition video. The performance of the decoding is not about it being "slow". It is about being able to support specific bitrates. If your decoder is slow, it can still play low bitrate video, but it will be unusable for higher bitrates. Video decoding is all about data ...


1

There is a distinction between "Logical Architecture" and "Physical Architecture", you can have the same code base and yet deploy it on a Web Tier and Middle Tier, or just strictly on the Web Tier. What you decide is based on a myriad of factors. If your Web Tier is merely a pass through to call more or less mirror services on the Middle Tier, then it ...



Only top voted, non community-wiki answers of a minimum length are eligible