|
Don't cross-post: choose one forum and ask your question there, don't put it in
multiple forums. CPians don't appreciate this.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
pinhigh2k wrote: Basically, I would like to use a C# form (or other construct) to simply house an already existing OpenGL window class written in C++.
Is it an ActiveX control? If it is it can be done easily.
Steve
|
|
|
|
|
Armond Sarkisian wrote: explain to me how the variable string gets shared between class A and class B
string generateString()
{
static int ticket = 1;
char buf[2] = {0};
itoa(ticket++, buf, 10);
return buf;
}
led mike
|
|
|
|
|
I'm early in the process of designing a new application...
to make it shorter as possible, what naming convention or policy do you prefer for your namespaces (and classes and other)?
In my last company we were somewhat "xenophobic" and mostly used Croatian words, while in company where I work now we use English almost exclusively.
I've been in both camps and I cannot decide to where should I turn.
What is your experience with naming in your native tongue?
|
|
|
|
|
Well, I'm English so it makes sense for me to do this in English. However, why not follow Microsoft's naming recommendations for namespaces? CompanyName.TechnologyName[.Feature][.Design]
|
|
|
|
|
I would usually do that, but this my side project.
To me it looks too vain if you would make something like this Deka.UI.Web .
I still have some time to think about it.
|
|
|
|
|
Oshtri Deka wrote: I would usually do that, but this my side project.
To me it looks too vain if you would make something like this Deka.UI.Web .
It's not vanity. It's there to prevent namespace collisions. Suppose you have two companies producing a project called Widget, then you would have Company1.Widget and Company2.Widget. In this way, the namespaces and classes won't collide.
|
|
|
|
|
That's obvious choice when you are working for a company, but this is a hobby project.
I'll put my nickname as part of basic namespace, vain or not... and people will know of whom they should make fun, if it ends as a pile of crappy code.
I am paying too much attention to some details.
|
|
|
|
|
Oshtri Deka wrote: That's obvious choice when you are working for a company, but this is a hobby project.
Still unimportant. If your code has the potential for any form of namespace collision then this is the obvious way to avoid it.
Oshtri Deka wrote: I'll put my nickname as part of basic namespace
That's fine unless your nickname is Microsoft.
|
|
|
|
|
Oshtri Deka wrote: I am paying too much attention to some details.
Welcome to the analysis paralysis club. I'm a founder member.
|
|
|
|
|
Perhaps we should organize a support group.
|
|
|
|
|
Hi,
I would suggest you use the same language for code as you do for comments.
So if you plan on commenting in English, choose English namespaces, classes, methods,
etc.
And if you comment in Croatian, use Croatian identifiers for everything you create
(of course the .NET Frameword classes will remain English, as in File.Open).
Personally I program in English exclusively, although it isn't my native language.
And I tend to buy technical books in English, not in Dutch/French/German/whatever,
since that only generates delays, confusion, less choice, and more errors.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I was recently asked to comment on a design where the architect has proposed that the entire business layer be exposed as a WCF[^] service to the presentation layer (a web app). The motivation apparently, is to make the business layer accessible to 3rd party applications. The idea is to expose a TCP/IP binary end point from the service that will be accessed from the web app and a SOAP end point meant to be used by 3rd party apps.
What do you folks think about this approach? Certainly, the WCF service would need to be load balanced[^] as otherwise its just going to be a bottle-neck as the app scales. Secondly, does it make sense to shield the WCF stuff from the web app via a facade layer? Maybe provide a proxy implementation for the business layer interfaces that simply forwards the call to the WCF service and hook it up to the web app using an IoC[^] framework?
Thanks!
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
A large reason for using WCF is to enforce and enable your applications to offer services via SOA. If it makes sense for the whole of your application to be exposed as a service, then this is a good idea. I find that people typically go OTT with WCF (and Web Services), by exposing absolutely everything or by needlessly making their code run as a service where it makes more sense to run the code in-process.
|
|
|
|
|
gleat wrote: does it make sense to shield the WCF stuff from the web app via a facade layer?
Absolutely, imho.
The web app (or any client) shouldn't need to use WCF semantics or any other service implementation dependencies. This allows (1) easier construction of mock objects for client side testing and (2) replacement of the backend API (if needed) without having your clients retool their code.
/ravi
|
|
|
|
|
Hi,
1. What is a basic skills a person need to become a technical architect ?
2. How much Minimum experience in development need ?
3. And my big question is from where to start ?
Grazie,
Regards,
Vythees
Miles to go before sleep...
modified on Thursday, March 27, 2008 6:57 AM
|
|
|
|
|
Here's the problem.
I have a project being re-written. It is using web services and a smart-client.
The document for the screen should include the data format of the web service being called.
The web service should include the data format for all of the methods that are available.
The client only needs one or two methods, while the service contains many.
I'd like to have the document for the client updated automatically when the web service is updated, but not include the entire web service doc.
As an "extra", I'd like to know where each method of the web service is called. (Which screens etc).
I'm hoping such a product exists. Otherwise, I might just have write the stinker.
Thanks
Brad Bruce
|
|
|
|
|
Are there any existing mechanisms to achieve this, or do I need to roll my own?
I have a small subset of text fields that cause problems when I assign an empty string from the UI to a field, which should be null if not specified.
|
|
|
|
|
Well I agree that this is a design question but since it is so specific we probably need to know the platform and language you are working with, yes?
Abandon hope all ye who answer here.
Pete O'Hanlon - the General Discussions forum
|
|
|
|
|
Sorry, that was quite an oversight. ASP.NET, in C#. I'm not specifically asking how to do this, just if it is done already by others, and how they do it. Input regarding other areas I would also appreciate.
|
|
|
|
|
Brady Kelly wrote: when I assign an empty string from the UI to a field
So this field is a Database column I guess? I imagine many people today are using Object Relation Mapping on the .NET platform and the tools and/or libraries/frameworks handle that stuff for them. Have you looked at the Castle project, specifically ActiveRecord which is built on NHibernate? Also if you are using 3.5 I have seen lots of positive noise about Linq.
|
|
|
|
|
Thanks Mike, I have planned to look at Linq, as I'm giving the other devs an intro to it next month.
|
|
|
|
|
I've just found one way of doing this with standard ASP.NET. The SqlDataSource Parameter elements all support a ConvertEmptyStringToNull attribute.
|
|
|
|
|
Brady - If you are reading things in with a datareader, then one way would be to use some code to convert your DB null string to a null string. A simple function would cope with this:
public string GetString(IDataReader item, string column)
{
int ordinal = item.GetOrdinal(column);
if (item.IsDBNull(ordinal))
return null;
return item.GetString(ordinal);
}
|
|
|
|
|
Hi All,
I want to develop ludo board game application with following feature.
It will be a multi user application where user can play from his desktop.
One server multiple user architecture
User can play from his home,cafe or under proxy server(college campus)
whenever user do his part it should be reflected to every user desktop.
Game rules and procedure must be exists on server for security.
Wht is it?
Smart client application
Dot Net Remoting
Web Services
Pl give your comments/suggestions /example
Thanks for everything.
|
|
|
|