|
Hi,
the general question you ask needs an entire book to contain a general answer.
Here are some facts:
1.
you are in the wrong forum, it is not a software design/archiotecture issue, it depends
foremost on the specific hardware.
2.
Most microprocessors have some kind of NOP instruction, and can execute that in 1 cycle.
So a 1GHz CPU (single core, no hyperthreading, ...) could execute 1 billion of those
in one second.
3.
More complex instructions may/will take longer; more so for CISC than for RISC.
A divide instruction may take 35 cycles or so (or not be available at all).
4.
Instruction scheduling nowadays complicates matter a lot: instructions don't always
get executed at maximum theoretical speed due to scheduling constraints.
5.
Memory bandwidth issues may slow things down (code cache misses, data cache misses,
table walk delays)
6.
Other system activity may reduce the throughput you are interested in: e.g. interrupts
dealing with timer ticks, network traffic, ...
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi!
Can you recommend me good UML tool with ability of code and/or database generation?
Something affordable ?
|
|
|
|
|
StarUML
Free, open source, has code gen. Don't think it supports DB stuff tho.
T
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
|
Hi there,
I'm building an .net application that will run various SQL reports according to given schedules.
My question is - what is the best way to implement a scheduler ?
The ideas I came up with were :
1) Creating a service for the application
2) Using windows scheduled tasks
3) Minimizing the application to the notification area in the bottom-right of the taskbar , and let it just sit in the memory and run the reports on its own.
I'm not sure if these ideas are any good.. it's just what I came up with and it's my first time messing with schdules.
Thanks.
|
|
|
|
|
Have you come up with any good ideas?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
|
Very cool looking article. Thanks for the link
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
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
|
|
|
|
|
|