|
Take a look at Rocky Lhotka's CSLA toolkit.
|
|
|
|
|
Is there any good documentation, except his books, on that? I built my first (and only) nation wide client server system based on the original CSLA, from the "VB6 Business Objects" book. I came short with child objects having child objects, but he has long since addressed that, and I am more than willing to give CSLA a try.
Pits fall into Chuck Norris.
|
|
|
|
|
He keeps his website up to date - has a very active forum on it, and (if you use CodeSmith) you can get fairly up to date CSLA templates to generate your code.
|
|
|
|
|
Hi,
Anybody please help me with this issue,
i am having two list views. Both these are having scroll bars.
What i want is that, i have to make only one scroll bar for both the listviews, so that if i am scrolling the scroll bar of the first listview, both should get scrolled...
i have seen in one application that its possible, that is not in c#, its purely VC++.
So please i need a help for this.
Thanks in Advance,
Roger
|
|
|
|
|
|
|
|
Pete O'Hanlon wrote: The C# forum.
And if that doesn't work, you can go here[^].
|
|
|
|
|
As in I have always worked on CRUD systems. I have googled for a list of systems but haven't been able to find much. I guess i'm just getting bored of the usual n-tier front end to a DB stuff, and want to know what else is going on.
Any help much appreciated.
Cheers.
|
|
|
|
|
Are you looking for types of software not like a business application using Database I/O as a main part of the system? So something like a Game or a Missile Guidance System? Are you looking for work in a different sector of the industry? I find your post rather unclear.
led mike
|
|
|
|
|
Mike thanks for your reply. I guess i'm interested in different architectures. Not looking for another job, just want to expand my knowledge. I guess a 3-tier archictecture is popular for DB storage and retrieval. What about when banks go mental processing stuff at night, batch processing etc - output of one app becoming input to another. Is there a name for a system (CRUD) or architecture (n-tier) like that? Do you know what i'm getting at? When you say missle guidance system i think of embedded C or something, but am interested more in higher level langauges. Maybe i need to check out design patterns more. Maybe a Model View Controller is another kind of system?
Wow big ramble. Probably best to just smile and nod.
|
|
|
|
|
Well I highly recommend everyone study Software Design Patterns but they have little to do with architectures and specifically Model-View-Controller is a design not a different kind of system. CRUD isn't really an architecture it's just an acronym describing basic Database operations. N-Tier is an architecture concept. It's not all that complex conceptually and it seems you might be over complicating this issue for yourself.
Systems design and architecture should be based on requirements. Systems should, although don't always, have an architecture that meets the needs of the use model and any enterprise/network/platform that they are required to operate within.
If you are having trouble consuming all these different terms and understanding them I highly recommend Wikipedia for introductory high level definitions of things like Design Patterns and N-Tier and CRUD etc.
led mike
|
|
|
|
|
I'm designing a class library to facilitate communications over TCP/IP. It has ease of use in mind and is event-oriented. Despite the departure from the base class library's way of exposing the networking functionality (synchronous and asynchronous methods), the class library I’m writing is based on a couple of classes from the base class library—the TcpListener and TcpClient classes in particular. It doesn't derive from it, but the API is very similar:
public class CorruptDataException : ApplicationException- public CorruptDataException()
- public CorruptDataException(string message);
- public CorruptDataException(string message, Exception innerException)
- protected CorruptDataException(SerializationInfo info, StreamingContext context)
public sealed class ConnectCompletedEventArgs : EventArgs- internal ConnectCompletedEventArgs(object userToken)
- public object UserState { get; }
public sealed class DisconnectedEventArgs : EventArgs- internal DisconnectedEventArgs(DisconnectReason reason, object userToken)
- public DisconnectReason Reason { get; }
- public object UserState { get; }
public enum DisconnectReason : int- DisconnectCall = 1
- None = 0
- RemoteDeviceDisconnected = -1
public sealed class ReceiveCompletedEventArgs : EventArgs- internal ReceiveCompletedEventArgs(Exception ex, IList<byte[]> data, object userToken)
- public IList<byte[]> Data { get; }
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SendCompletedEventArgs : EventArgs- internal SendCompletedEventArgs(Exception ex, object userToken)
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SlipClient : IDisposable- public SlipClient()
- public void Connect(EndPoint remoteEP)
- public void Connect(IPAddress[] addresses, int port)
- public void Connect(IPAddress address, int port)
- public void Connect(string host, int port)
- public void ConnectAsync(EndPoint remoteEP, object userToken)
- public void ConnectAsync(IPAddress[] addresses, int port, object userToken)
- public void ConnectAsync(IPAddress address, int port, object userToken)
- public void ConnectAsync(string host, int port, object userToken)
- public void Disconnect()
- public void DisconnectAsync(object userToken)
- public override void Dispose()
- public IList<byte[]> Receive()
- public void ReceiveAsync(object userToken)
- public void Send(IList<byte[]> data)
- public void SendAsync(IList<byte[]> data, object userToken)
- public event EventHandler<ConnectCompletedEventArgs> ConnectCompleted
- public event EventHandler<DisconnectedEventArgs> Disconnected
- public event EventHandler<ReceiveCompletedEventArgs> ReceiveCompleted
- public event EventHandler<SendCompletedEventArgs> SendCompleted
- public bool Connected { get; }
- public EndPoint LocalEndPoint { get; }
- public bool NoDelay { get; set; }
- public int ReceiveTimeout { get; set; }
- public EndPoint RemoteEndPoint { get; }
- public int SendTimeout { get; set; }
public sealed class SlipClientAcceptedEventArgs : EventArgs- internal SlipClientAcceptedEventArgs()
- public SlipClient Client { get; }
- public Exception Error { get; }
- public object UserState { get; }
public sealed class SlipListener- public SlipListener(IPEndPoint localEP)
- public SlipListener(IPAddress localaddr, int port)
- public void AcceptSlipClientAsync(object userToken)
- public bool Pending()
- public void Start()
- public void Start(int backlog)
- public void Stop()
- public event EventHandler<SlipClientAcceptedEventArgs> SlipClientAccepted
- public bool Active { get; }
With the exception of CorruptDataException, which happens to be under the first level (root) namespace, all the other classes are under a third level namespace company.Net.Sockets. As you can see, the two main classes are SlipListener and SlipClient. "SLiP" happens to stand for serialized list protocol. In its current incarnation, it only serves to facilitate the transmission of messages with parameters. I won’t get too deep into the format of the byte stream right now. I’ll save that for an upcoming article.
Okay, I’ve been babbling on long enough. Now for the questions (which concerns the SlipClient class for the most part):
- The SlipClient class has two internal AutoResetEvent fields. One controls access to the send methods, and the other controls access to the receive methods. In effect, one send method must return (or the SendCompleted event raised) before another send method can proceed. The logic is similar for the receive methods. Should I scrap the wait handles and allow calls to the send and receive methods to be uncontrolled by the class?
- For the SlipClient class, the synchronous Receive method returns null if the remote machine disconnects before all the necessary bytes (the ones needed to reconstruct the IList<byte[]> that was sent) are received. In conjunction, it raises a Disconnected event using a ThreadPool thread (so the event handler can’t block the rest of the Receive method from executing). Should I throw an exception instead of returning null?
- All the networking-related classes are sealed because I’m not sure how to open up the classes to extension. If you were extending the class, what would you like to be able to do?
- You’ll notice that the ReceiveCompletedEventArgs class has a Data property that returns an IList<byte[]>. Yet, I’d like to be able to add other classes like SlipClient and SlipListener, but have them work with something other than IList<byte[]>. In other words, I might have other classes sharing the same namespace. I’m aware of four options I can go along with:
- Return an Object object for the Data property so all my other classes can use it.
- Create another class to encapsulate the data to be sent and work with that class instead of IList<byte[]>. The class will have the necessary properties and methods to allow for flexibility.
- Rename the class to something like SlipClientReceiveCompletedEventArgs so it is exclusive to the SlipClient class’s events. I think it’s a bit long, but I could deal with that.
- Scrap the current class and make a new one that can work for any new classes. I’m not sure how to go about this route, but it sounds nice.
- Should I have the Receive and ReceiveAsync methods at all? I mean, I could have the class automatically fire events as the data comes in, but I feel this will make it very chaotic. Besides, SlipClient is returned by SlipListener, and if the SlipClient class starts firing events before the application can add its event handler, data will be lost. I already know what to do to solve it, but the ideas seem very inelegant, and I’m left thinking it’s better to keep the Receive and ReceiveAsync methods there so the application can control when and how fast it receives data.
It’s been a long message and a big headache trying to make the API conform to .NET standards and conventions—even more so than writing the actual code. I’d be very grateful for input.
|
|
|
|
|
Hi,
I am not going to study and comment on your protocol, but I have one remark:
there already is a SLIP protocol[^], you may consider choosing a different name.
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.
|
|
|
|
|
That's disappointing.
So the creationist says: Everything must have a designer. God designed everything.
I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?
|
|
|
|
|
Hello
Is there a way to change the order of the components in the container.
I know that components follows the order of when it is added in the container.
But is there a way to rearrange the component in the container.
Thanks.
|
|
|
|
|
Which container, which language are you working with ??
|
|
|
|
|
Sorry for being unclear,
Im working with c# in vs2005.
Im pertaining to the IDesignerHost.Container.
I'm looking for example on how to rearrange the components in the container.
thanks
|
|
|
|
|
If someone has a spare minute or two, please could you give me some critique on my draft outline for a technical spec for an ASP.NET web site. Have I left out any important high level sections?
1. Overview
1.1. Description of goal of the project.
2. Use Cases.
3. Business Objects.
3.1. Business Object Name and description. E.g. ‘User Comment’
3.1.1. Business Object Attributes. E.g.
3.1.1.1. Comment Date
3.1.1.2. Staff Member
4. Business Rules.
5. General Architecture.
5.1. Data Tier.
5.1.1. Platform and implementation.
5.2. Business Tier.
5.2.1. Platform and implementation.
5.3. Presentation Tier.
5.3.1. Platform and implementation.
6. Database
6.1. Security.
6.2. Conventions.
6.2.1. Naming.
6.2.2. Table Keys.
6.2.3. Tactics, e.g. only using stored procedures for access, only using views for reporting, etc.
6.3. Tables.
6.3.1. MS Word Table of table names and contents.
6.4. Stored Procedures
6.4.1. MS Word Table of stored procedure names, purposes, and tables accessed.
7. User Interface
7.1. Overview
7.1.1. ASP.NET
7.1.2. AJAX.
7.1.3. Master Pages.
7.1.4. Use of Page and User Controls.
7.1.5. Detailed Descriptions of all pages and controls.
7.2. Layout.
7.2.1. Design.
7.3. Graphics.
7.3.1. Images and animated content.
7.3.2. General Theme.
8. Miscellaneous.
8.1. Deployment.
8.2. Configuration.
8.3. Administration.
|
|
|
|
|
All, I am new to the C# world and I am having some difficulty in finding information on the following.
Is it possible to gain access to a Win32 window handle or CWnd pointer from within a C# application/form. Basically, I would like to use a C# form (or other construct) to simply house an already existing OpenGL window class written in C++. I would like to maintain all functionality already built into the C++ derived, 3D/OpenGL Window object.
Any information and/or direction to other sources would be greatly appreciated
Thanks in advance,
Michael
|
|
|
|
|
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]
|
|
|
|