|
I am working in a Program that works with 3 serial ports 1 I/O Board and a Camera.
Anyone know about some design pattern made to Asynchronusly read the information on all these devices?
JO
|
|
|
|
|
Ju@ncho wrote: know about some design pattern made to Asynchronusly read the information on all these devices?
I don't know about design patterns but the Windows API includes Overlapped IO features, is that what you mean?
|
|
|
|
|
No, what i am meaning is a way to encapsulate the Overlapped IO features of serial ports plus other custom overlapped IO features of other devices (ie Adquisitions Boards)in a single design pattern. I think that the observer pattern should work but i am not sure..
JO
|
|
|
|
|
Ju@ncho wrote: the Overlapped IO features of serial ports plus other custom overlapped IO features of other devices (ie Adquisitions Boards)
Ok. I know what Overlapped IO is, I know what Asynchronous is, I have no idea what "IO features of serial ports" or "custom overlapped IO features of Adquisitions Boards" are.
Ju@ncho wrote: I think that the observer pattern should work but i am not sure..
Well the observer pattern has two sides (observable - observer) where the observer side supports multiplicity. So far you have only discussed the observable side of your scenario so we have no way of knowing if that pattern exists in your problem space. Also I have no idea how or why the "features" you referred to are related to the observer pattern.
|
|
|
|
|
may be you can have a look at Microsoft's Asyncronous block from MS patterns and practices. not sure.
cheers
varun.y.sharma@gmail.com
|
|
|
|
|
Hey everyone,
I am a novice when it comes to MFC/Win32 programming. My background is in embedded C type work. I have the need to make a utility to help me analyze binaries. I wanted to ask for suggestions on how to structure a project similar to MS Visual Studio's Binary Editor. I will want at least the same functionality and I will be adding to it. I will want to be able to tag ranges of the binary and save those tags as a session. Also would like to eventually plot the data ranges that have been tagged.
Also I would like to ask if anyone has any good tutorial resources for MFC programming. Most of the tutorials I have tried to follow do not seem to be up to date. I am running VC++ 2003 .NET and when I try to follow the tutorials I have found there are missing gaps like for Class wizard or something like that.
Any help would be appreciated.
Thanks in advanced,
Mike
|
|
|
|
|
mvs_pgrmr wrote: Most of the tutorials I have tried to follow do not seem to be up to date.
Are you finding them on MSDN? I would suspect (reads: assume )they would have some up to date ones
mvs_pgrmr wrote: I wanted to ask for suggestions on how to structure a project similar to MS Visual Studio's Binary Editor.
Good luck with that. Creating editors of any type is a large undertaking IMHO. I've been doing MFC dev. since version 1.0 and it would take me a long time to develop what you describe. As a "utility" I wouldn't even consider doing it.
|
|
|
|
|
led mike,
Thanks for your opinion. I appreciate your comment on how much work this would take. Finding out what it would take to make such a tool is actually my main objective. You have confirmed my impression that it would take a lot of man hours. My need for such a tool is always brought to mind but never executed. I think it is going to be one of those things that will always be on the back burner.
Respectfully,
Mike Santos
|
|
|
|
|
In our application our atchitect created the Business classes with following structures containing Data Access Layer, Business Layer, Business Entities Layer, Presentation Layer.
Business Entities Class
public class PersonFormData
{
#region Fileds
private int id;
private string name;
#endregion
#region Properties
public int ID
{
get
{
return id;
}
set
{
id = value;
}
}
#endregion
#region constructors
public PersonFormData()
{
//
// TODO: Add constructor logic here
//
}
public PersonFormData(int pid, string pname)
{
id = pid;
name = pname;
}
#endregion
Business classes
//This class is the Person business class
public class PersonForm
{
#region Fields
private readonly PersonFormData formDataObject;
#endregion
#region Constructors
public PersonForm()
{
}
public PersonForm(PersonFormData formDataObject)
{
this.formDataObject = formDataObject;
}
#endregion
#region SaveForm
protected override bool SaveForm()
{
//Calling the Data Access Layer methods
PersonFormDataAcess.UpdatePersonForm(formDataObject);
}
#endregion
// This class provides static "factory" methods that create instances of Forms
Public static class FormFactory
{
public static PersonForm CreateEmptyPerson()
{
// Observe that the no-argument Chapter41ContractForm constructor creates all of the form's
// related business objects.
return new PersonForm();
}
public static PersonForm LoadPerson()
{
PersonFormData formDataObject= PersonFormDataAcess.LoadPersonForm(Params);
PersonForm result=new PersonForm(formdataObject);
return result;
}
}
Data Access Layer methods
//This is the Data Access Layer class
public static class PersonFormDataAcess
{
public static UpdatePersonForm(PersonFormData formDataObject)
{
//Calling the stored procedures here;
//Accesing the business entities object fields to pass values to database.
formDataObject.ID;
}
public static LoadPersonForm(Params)
{
PersonFormData formDataObject= new PersonFormData();
//Call stored Procedure to load person data from the database
//Putting retrieved data into the PersonFormData object
}
}
//From the Presentation layer
//Creating the Person business class object.
PersonForm personFormObject = FormFactory.CreateEmptyPerson();
Here my question is he is following the which design patterns?
|
|
|
|
|
The answer is just there for you to find; use your 2 eyes.
|
|
|
|
|
I don't know any thing about patterns, So I posted the question here. If you want to help give the answer other wise why would you answer this post? IF I know what patterns he implemented then I search for those patterns to get more information. With out knowing the pattern I searched the web It gave me so much information.
To learn about patterns I want to start from the pattern which I have some examples from my application.
|
|
|
|
|
Mahimam wrote: To learn about patterns I want to start from the pattern which I have some examples from my application.
I suggest you read books about patterns rather than learn from that code. The books explain things that the code won't.
|
|
|
|
|
You should look at: http://en.wikipedia.org/wiki/Design_Patterns
and I think this tool will help you:
http://dpatoolkit.sourceforge.net
Regards,
Andrew
|
|
|
|
|
hi there,
if you look at the last line of code you wrote, the word Factory suggests he is using software factories. Software factories is a bit vague as you can use different patterns to implement it, i,e Abstract Pattern. If you want to learn more than download the
Microsoft .NET PetShop application and see how its software factories are implemented.
http://msdn2.microsoft.com/en-us/library/aa479071.aspx[^]
The other resource you can try is:
http://www.dofactory.com/Default.aspx[^]
Hope this helps.
|
|
|
|
|
Hello all,
We have to design an application which will run on client PC and can get the latest updates from the server(Publisher) automatically.
Please share if you have any idea.
Thanks much.
Regards
|
|
|
|
|
|
|
I used ClickOnce in my application. ClickOnce is very easy to use.. but it's not able to give you the detailed information that you need...
|
|
|
|
|
What did you find missing? I thought the sys deployment namespace covered a great deal of scenarios?
|
|
|
|
|
I started using ClickOnce in my project last month.. I used the dynamic updates from code..
#1. No way to get the list of latest modules..
I was tying to implement the Firefox-Plugin auto-update style in my application.. I wanted to show the list of updated modules that suppose to be downloaded. Unfortunately, there is no way to get the list of updated modules through code....
My question posted in my MSDN Forum : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2232226&SiteID=1[^]
#2. The version of the whole application need to be updated if we wanna update just one module
It's really suck about ClickOnce... If we wanna update just one module, we will need to change the version of application (e.g. "shell.application" ) and the version of manifest (shell.manifest)... i dont really like that thing..
#3. ClickOnce doesn't care about the version of assemblies.
I don't understand why ClickOnce doesn't care about the version of assemblies. What it cares about the version of *.application, the verison of manifest and the file hash of each assemblies... I dont think that it's is very good idea...
#4. DownloadFileGroup ("") works only if "optional" is checked. There is no way to download the group of file by force
Why "optional" need to be checked in order to make DownloadFileGroup work..... What I wanna do is that I wanna the application ( all file groups) to be downloaded at the first time.. later, I wanna download a particular group of files by force.. if I can download the group of file by force, I don't need to change the version of the whole file for updating new module..
My question in MSDN forum. : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2279424&SiteID=1[^]
|
|
|
|
|
Thanks Michael
|
|
|
|
|
I have a mind to create a plug-in based application. This type of architecture seems appropriate to my current project as it would make the application extensible so that new functionality can be added simply by distributing new plug-ins.
One question that keeps popping to the front of my mind, however, is how to enable inter-communication between various seperate, but related, plug-ins (for instance, Customer information might be useful to more than one plug-in). Has anyone got any links to any resources that describe known (and presumably successful / recommended) methods for achieving such a thing?
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
martin_hughes wrote: methods
are going to vary based on both functional and non-functional requirements of which you provided none. Therefore the only link I can think of that would be of any use is http://www.google.com
|
|
|
|
|
Which language are you developing with ?
EDIT: if you are using Java, I suggest you take a look at OSGi[^]. The plug-in system of Eclipse is built on top of OSGi.
|
|
|
|
|
I'm looking at creating a CSV (or, in general, delimited) file compare tool. Using an everyday diff tool is OK, but I would like to get results in terms of columns, i.e. I want to highlight columns added or delete, and just make the user experience a little better for the testers for a mammoth test project I'm embarking on. Where can I find out more about compare algorithms?
|
|
|
|