|
i dont know anything about programming or designs but i want them to make a system in short it accepts documents PDF or word doc from various companies and they all arrive at our server, currently we are now manually selecting then printing each page, so my question is what technologies needed to make the process of making the arrived documents to be auto printed then saved in a database and then each document gets our company stamp on top of each paper + we want each document to have different barcode different serial number then the other documents. am doing the process manually on photoshop taking the company stamp and placing it on top of each paper but we didnt do the barcode method yet
|
|
|
|
|
Whay you posted is an explanation. Maybe not a very detailed one, but details would distract from the general idea you're conveying.
I'd first recommend to divide this into multiple (!) smaller projects; it'll be easier to handle. Receiving documents and putting them into a database should be relative easy. Stamping each document will be a lot harder - there's some readonly formats, and a password-protected Word file might be hard to modify. If the files are in a database, then another application can fetch those (independently of the rest of the apps) and prnt them (once!).
There's a four-part series on Joel that can help with creating specs[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If you're explaining the requirements to your developers then you don't need to worry about the details of implementation. Let them worry about that. What you need to do is document in as much detail as you can, and as clearly as you can, what you need the application to do. Think in terms of inputs and outputs.
Once you have documented your requirements, then pass this document to your development team to implement.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
Member 11331225 wrote: How can i explain this to our programmers?
Just like you did. They would/should then ask you questions to clarify it.
For starters how exactly does the following happen "accepts documents PDF or word doc from various companies".
Member 11331225 wrote: and then each document gets our company stamp on top of each paper
Just to be clear...that sounds a bit suspect in terms of copyright. If the documents are originating from another company then you are bound by their terms of usage. You don't get to arbitrarily alter them unless it is within acceptable usage parameters. Not saying that you can't do this just why.
Might also note that this requirement - adding something to each page is going to make the project more complex.
And why do you need to print them at all?
|
|
|
|
|
I am currently working on a store search function. The search criteria are quite complex, for example:
Footage >= 50 AND (SizeCode == SizeType.Large OR MobileEnd == "ABC")
I think that each criterion could be represented by a Func<store, boot> (I am using C# and LINQ).
Func<Store, bool> filter1 = (s => s.Footage >= 50);
Func<Store, bool> filter2 = (s => s.MobileEnd =="abc");
Func<Store, bool> filter3 = (s => s.SizeCode == SizeType.Large);
My question is how I can deal with AND, OR, NOT logic, and order of precedence. How can I convert the user input into a LINQ expression?
Thanks.
|
|
|
|
|
|
Scott Guthrie[^] has a solution and there's an article on the subject[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi all,
Any suggestion or tips on application architecture if i need to develop a server application which is using to communicate with remote machine?
(remark : machine firmware is using ROS.)
Original idea:
a) Client UI (.aspx) <---request/response---> web server(IIS) & db <---communicate via network connection---> machine
b) robot will keep update status to db via web server application every few second.
c) Meanwhile, server application need to do some algorithm then response to robot every few second or any instruction from robot.
d) Client need to connect to server every second to get the latest data (monitoring purpose)
e) Client can control robot via server application.
My question are,
1) shall i develop the server application using web technology or using window programming? (I found some article said that can using websocket .NET 4.5 as server,is suit for my case? )
2) what is the pro and con for both web and window programming?
Any tips or suggestions are welcome
Thanks in advance
wls
modified 17-Dec-14 12:47pm.
|
|
|
|
|
cocoonwls wrote: what is the pro and con for both web and window programming? That's a general question, not limited to your project. A webapp requires a webserver, a windows app a desktop. With a desktop app you know the user, in a webapp you can have multiple. Webapps have no access to local resources, local apps do.
cocoonwls wrote: 1) shall i develop the server application using web technology or using window
programming? I'd recommend diving into their tutorials first.
Looks[^] like ROS runs under a 'nix system, meaning that the harder part is making the call from the robot.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi, thank you for your response.
Actually making the call from robot was done by team member (via wifi protocol). Now i need to build a server application to handler/receive multiple request from robot.
I am now researching on <websockets with="" httphandler="" &="" javascript="">.Am i in the right track?
Note: My final output is allow user to control the robot via client application which is develop by using HTML5,jqery,javascript and asp.net with C# (idealy)
Regards.
|
|
|
|
|
cocoonwls wrote: Actually making the call from robot was done by team member (via wifi protocol). Yup, sounds like TCP/IP, but that does not answer whether the robot will be pushing/reading from a socket, or is expecting a webpage. You'd need to ask the team-member.
cocoonwls wrote: I am now researching on websockets .Am i in the right track Depends on what the team-member says, but I'd expect that it'd be the right track.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Quote: Yup, sounds like TCP/IP, but that does not answer whether the robot will be pushing/reading from a socket, or is expecting a webpage. You'd need to ask the team-member.
The robot will keep sending request to server (handshaking with server) , thus most of the time the server application will be in listening mode. Unless there have certain command need to robot take action, then server application will send a command via socket (robot have their own API).
Okay, now i am quite clear what should i do but one more things. For the server application, i need to response a webpage to client, so do i need to separate the server application ? what i mean is one server application do for serve robot, and another one do for client.My client need to monitor all the robot information on-time (update each 1 to 3 second).
Thanks again
|
|
|
|
|
That will depend on how your teammate will have implemented it on his side. You should ask if he/she can actually communicate using webpages (does the robot have a server where you can request pages from?)
A socket would be simpeler, as you'd open it and wait for a text to arrive
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Quote: A socket would be simpeler, as you'd open it and wait for a text to arrive Smile |
Okay, i think i will continue in websocket solution which is able to communicate with ROS
This is my last question, shall i develop the websocket as a window service or just host in IIS?
Thanks in advance
|
|
|
|
|
Host it in IIS.
Windows Services are meant for applications that do NOT require interaction with the user, and are usually started before a user logs on. It would introduce complexity without any extra benefits.
If you want to create a WinForm UI, then create a WinForm app. The choice would be between a webapp and a WinForm app, not a Windows service. Given your experience, I'd recommend the webapp.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy,thousand thanks for your suggestion and tips
Another question
if websocket compare with WCF, which technology is more suitable for communication with machine/robot?
modified 23-Dec-14 0:13am.
|
|
|
|
|
You're welome.
I haven't used WCF yet, so I can't comment there. I'd be going for a prototype using the socketclasses, probably TcpClient - though WCF is supposed to be a bit more friendly and flexible.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
Since a robot is a real-time system, I wouldn't want to mix it directly into a web server.
I would make an application in C# or Java with a dedicated socket for communication with the robot. This application can continuously communicate with the robot - read states and send commands.
When that is in place, you can do use a database or the file system to pass data to and from a webserver. In this way you have the application in control of when to read a command from a client, when to send the command to the robot and when to sample the states of the robot.
In a typical web servers everything is request based. A request is initiated by the client and your code is basically a method call that has to return as fast as possible. It might be easy at start, but it is a poor way to monitor a robot. As an example it becomes a difficult task to track the robot and document where the robot was and then deduce why it did as it did.
I would let a standalone application dump the robot's state to a file system periodically and let it check the file system for the next command to send. In this way - if it is made flexible enough - you can have a folder with commands that takes your robot for a spin and produces a folder with its monitored states. If it fails, you can redo the experiment after changing what not on the robot, and you will have all data stored in the file system for your report.
Afterwards you can make a web server page that reads/writes the file system.
Kind Regards,
Keld Ølykke
|
|
|
|
|
Websocket is an extension of http protocol. Therefore, your machine (robot) needs to understand websocket (and http) protocol if you plan to use websockets. You also need IIS to run your web application.
Plain TCP sockets require less overhead but *may* require the robot to open a listening port (and your web application will send its updates to this listening port). Whether you need an extra listening port on the robot depends on implementation of your robot.
You can use a web app to serve Client UI and plain sockets to communicate with your robot. Additionally, you can use websockets to send monitoring data to Client UI. However, you need latest browser for websockets to work.
|
|
|
|
|
Hi,
instead of using types like int, float or bool, I came to the thinking of typedeffing/classing all the built in types to what they actually represent in the code. (in language, that support this feature)
e.g. (c++)
typedef int Age;
typedef int Number
Age ageOfAPerson;
Number donatedMoney
...
Reasons for doing so:
* having full control over what type the variable really represents.
scenarios:
- an ID is a *number* at first and changes to have letters in it later
- the System (connected with a database) was not designed for having so many users and now we're running out of IDs (getting closer to max-integer)
* throughout all code it's rather easy to see which variables represent the same functional meaning.
* range-changes can be made rather easy: just change the typedef
* deciding that one former "just-variable" should be a class with a function or some range checking can be implemented rather easy.
* avoid uncareful castings(anti-temptating): it's easy to cast a "integer" to an "unsigned integer". But it's rather hard to cast a "second" to a "user-id", even if both is an "integer" behind the scenes.
On the cons-side of course, we have a massive overhead (at first)
what do you think about that?
Would be pleased to hear some experiences or opinions
regards
|
|
|
|
|
There is no reason not to, but if you miss the typedef it is easy to think that this type is a class rather than a basic type. I would definitely not do this in a project that would be worked on by other developers. Trying to maintain other people's code is not easy at the best of times.
|
|
|
|
|
Hi,
Quote: There is no reason not to, but if you miss the typedef it is easy to think that this type is a class rather than a basic type.
I think, it should matter what it really is. This would basically the reason to do it. Masking the types. Only then it would be no Problem to make it a class later.
|
|
|
|
|
It's a good choice for APIs or libraries that should be given to other developers, because if you keep the interface the same you can change implementation easily should the need arise.
Another good reason to use this pattern is when you have ever-shifting technologies, if you need to heavily multiplatform your project you could hide some code in the type class to arrange for different word sizes, signed/unsigned mismatches and so on.
In any other case I would be reluctant to use it because it is a massive overhead over simple operations - it would be good to use in the frontier classes but not in the inner worker functions.
Not only that, but debugging may rapidly become complicated, passing through constructors and methods of all sorts for simple operations. Also the size of the code grows and that too can be a performance and deploy problem.
That said, I admit my vision is biased towards intensive high performance semi-embedded systems, probably for business applications and network middleware a more diligent and safe approach is better - but I wouldn't know, having no consistent experience in the field.
My 2 cents.
Geek code v 3.12
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X
|
|
|
|
|
den2k88 wrote: In any other case I would be reluctant to use it because it is a massive overhead over simple operations - it would be good to use in the frontier classes but not in the inner worker functions.
Not only that, but debugging may rapidly become complicated, passing through constructors and methods of all sorts for simple operations. Also the size of the code grows and that too can be a performance and deploy problem.
Huh? In C++.
A typedef for an int is erased in the binary. Excluding perhaps meta data it has no impact on how the code runs.
Maybe you are thinking of replacing every type with a class rather than just simple type?
Although I question that as well. If a class only has a single data member and that data member is an int then the most efficient compiler optimization would be to allocate storage for just the int. Thus all forms of method passing would have exactly the same cost as the int itself.
As far as code growth at least in standard desktop applications the actual code size (binary) is never a problem. It is the runtime memory usage that can become a problem. If you have a C++ application that compiles down to a 1 gig binary then good for you but that certainly isn't the standard app. Conversely many smaller apps can easily using 1 gig of memory while running for data.
But maybe you meant something else that I was thinking of?
|
|
|
|
|
jschell wrote: Maybe you are thinking of replacing every type with a class rather than just simple type?
Precisely - otherwise it has little sense if not to allow further modifications to the API, as time_t that can expand either to _time32_t or _time64_t (I have no code at hand so I may be making some naming error but i trust it is inteligible).
As I was saying, this is useful if you provide APIs and want to keep the interface changes at the bare minimum, internally it has no sense.
jschell wrote: If a class only has a single data member and that data member is an int then the most efficient compiler optimization would be to allocate storage for just the int.
Never rely on compiler optimizations unless you can force them, undertand them completely and enable/disable them at will for every single block of code inside the code itself - and then prepare to fight hard when you upgrade the compiler to a new version (yes, we're still using VS6 for that reason, and it's all out of support, like one day will be VS2008, the one which is our "future").
Using classes with only one data member in the inner working of a component is overkill at best, makes debugging much more convoluted. Classes IMHO should be used to express composite concepts where the single data members may change but leaving externally the same interface. One class per type is really messy.
Of course none of the above are destructive problems, these are only the reasons for which I, with my small luggage of experience and my viewpoint, wouldn't use this design pattern unless it is prove to be the most effective way in some context.
Geek code v 3.12
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X
|
|
|
|