|
Outside of your normal n-tier approach there is not so much different going on.
email
for email you can always write it to use smtp. This implies you have an smtp server. (IIS eg is already capable of doing this, so I guess a java equivalent can also)
An smtp mail is pretty straightforward, to, cc, bcc, from, subject, mailbody and attachments depending on what you need and I'm pretty sure Java has objects available.
Sms.
To send an sms you'll need an application that can do this and provides a component that you can use. I say application, because that will have to go through a phone central or something similar. The best thing you can do is check with the provider, who knows they have a webservice that you can use. Once you have that, it's basically the same as an email: phonenumber sender, phonenumber receiver, smstext.
shelltton wrote: when a vehicle arrive or aprouch in an pre definined route
This will be the hard part depending on your needs. If it is a real route they're following you'd somehow need to match the 'triggering' route with the real followed route. Can't help you here.
If the 'route' corresponds to an area and you need to trigger if an object entered that area this might be simpler, unless the area is polygon (polygons can be pretty complex), in that case you need a special algorithm that divides the polygon in seperate regular polygons (square, triangle, ...). If the area is a circle or a square or something like that you just need to check if the XY coordinate of the object is within the regular square/triangle/circle/... If you can go for a square or circle.
Triggering
Normally you can subscribe to a callback of the object that provides the coordinates of the moving vehicle (GPS?). In that callback you need to check whether it is within the boundaries of the area or is on the triggering route for an email/sms and send.
I realize that this not a complete answer to what you probably want, but I hope it might give you enough information to start. if you have more detailed questions, shoot, I'm no wizard, but I can try to answer
V.
|
|
|
|
|
I wonder how you can mention real-time and e-mail in one thread. All an email system does is try and deliver your message at some undefined point in time, there is no guarantee whatsoever as to success nor speed. Messages that typically arrive in under one minute may as well take hours to arrive, or get lost permanently.
I'm not sure, however I guess the same holds true for SMS.
|
|
|
|
|
Is this a real (business) system?
Then I doubt anyone cares if it gets to a location on time. What they care about is when they don't get there on time.
And humans are not "real time" and email/sms isn't either.
If you are using a GPS then it sends location information every X interval.
You have a map (on a server) tied to GPS id which locates itself on the map and which receives the GPS info.
If the analysis finds a problem (or maybe a ontime for a student app) then it sends a notification.
The notification api (its own layer not part of the above) determines who to send the notification to and how to send it.
For a real business system it probably needs throttling as well. That way the COO doesn't get 1000 pings an hour when the city has a snow storm.
|
|
|
|
|
sexy girlï¼video for adult ï¼ more than 30 videos,just for make money from sharecash.org while you download the files.http://sharecash.org/download.php?file=2531204
|
|
|
|
|
sexy girlï¼video for adult ï¼ more than 30 videos,just for make money from sharecash.org while you download the files.http://sharecash.org/download.php?file=2531204
|
|
|
|
|
Hello,
I got a requirement from the admin group of a public website that they need to get a report everyday. The reports can be created wth an operation in the site and at the end of the day admin should be able to access the data. I am exploring the possibilities of exposing an ftp path location without compromising the security.
Any suggestions on this?Basically, I want to know is it risky to do this in this way and should i suggest some alternate solution.
Regards,
Jith
|
|
|
|
|
Presumably you have a web site rather than a ftp server. And you are going to support a ftp protocol on the web site.
As such the web site is what provides the authentication/authorization.
|
|
|
|
|
I assumed you meant this:
* Admin clicks 'generate report' button
* System writes file into 'reports' folder
* Admin uses FTP to access the 'reports' folder to access a report
If so, you can make this work well: FTP is done independently of HTTP, so you can make an entire FTP address that can ONLY access the reports folder, depending on how you configure your server.
You can also make the reports read-only to the FTP user etc. If you really wanted, you could just point the FTP access to the root of the site, and deny access to everything except the reports folder, as you see fit.
If you manage your permissions correctly, there is absolutely no risk involved.
Don't forget to rate my post if it helped!
"He has no enemies, but is intensely disliked by his friends."
"His mother should have thrown him away, and kept the stork."
"There's nothing wrong with you that reincarnation won't cure."
"He loves nature, in spite of what it did to him."
|
|
|
|
|
sexy girlï¼video for adult ï¼ more than 30 videos,just for make money from sharecash.org while you download the files.http://sharecash.org/download.php?file=2531204
|
|
|
|
|
I've done very little formal diagramming, so I'm wondering what the standards are these days. I'm particularly talking about program structure, class structure and database structure, but I'd love to hear about any others you use too.
For reference, the only diagramming I've done was back in high school IPT: Nassi Schneiderman Diagrams (Structograms)[^] and Conceptual Schema diagrams[^].
Don't forget to rate my post if it helped!
"He has no enemies, but is intensely disliked by his friends."
"His mother should have thrown him away, and kept the stork."
"There's nothing wrong with you that reincarnation won't cure."
"He loves nature, in spite of what it did to him."
|
|
|
|
|
Never heard of those.
UML, Unified Modeling Language, is basically the standard for most of that.
|
|
|
|
|
Those diagramming standards are probably 20 years old? Older perhaps?
Don't forget to rate my post if it helped!
"He has no enemies, but is intensely disliked by his friends."
"His mother should have thrown him away, and kept the stork."
"There's nothing wrong with you that reincarnation won't cure."
"He loves nature, in spite of what it did to him."
|
|
|
|
|
UML has evolved since it was first defined. It is a very powerful tool.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
As mentioned before, UML is the standard for software design and architecture. SysML is a bit more general and not restricted to software lifecycle management. These are being standardized by the OMG (object management group, not 'oh my god ).
UML and SysML are in fact a whole bundle of diagram types and elements, some of which may even look familiar to what you know. However, using them correctly isn't exactly easy, and a constant source of discussion even between experts. If you wish to properly learn to use them, the best way is probably to visit a course: being able to discuss ambiguous areas with real persons is invaluable!
Personally I mostly stick to class diagrams, because the UML tool I have can directly generate code from them and even synchronize changes in the code with the model. I also occasionally use sequence diagrams to describe the workflow of a particular function or algorithm that involves several objects. I've also found state machines or state diagrams helpful when modeling embedded software components. if you're involved in the early phase of project lifecycles you might also want to look at Use Case diagrams or Requirement diagrams. The latter are rather new and actually part of SysML, not UML, but can be used in conjunction with Use Case diagrams nonetheless.
Personally I do not know of any good online source that would be good for a beginner to learn UML. I've learned it in a course about the Unified Process (back then it was the Rational Unified Process, but it's now open source), which uses all of these diagrams. Maybe there's some useful info around in that area.
I suggest you look up these keywords on wikipedia or elsewhere:
UML, SysML, class diagram, sequence diagram, state machine or state diagram, Use Case diagram, Requirements diagram, Unified Process.
|
|
|
|
|
Thank you very much. I suppose I'll just have my own little home-brewed flowcharts until I need something on that scale. I suspect I'll learn about that in university though.
Thanks for taking the time to write such a detailed and practical reply!
Don't forget to rate my post if it helped!
"He has no enemies, but is intensely disliked by his friends."
"His mother should have thrown him away, and kept the stork."
"There's nothing wrong with you that reincarnation won't cure."
"He loves nature, in spite of what it did to him."
|
|
|
|
|
That's just as well. I often like to ask experienced programmers how they do it, and the answer I've often got was 'pencil and paper' The reason is simple: there's always some tidbit of information you want to add and don't know how to using a specific type of diagram, so the easiest way is just to do it in the way you're most comfortable with.
As I said, my main reason for using class diagrams is that it generates code as well. but I still use pencil and paper quite a lot.
|
|
|
|
|
Start using UML, it's very simple and the key point is it is a very common method for system modelling and understandable by computer professionals and laymen alike. If you use something like UMLet[^], my personal choice and it's free, you'll find it very easy to draw diagrams and will soon get the hang of it.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Hi,
I'm in the process of defining some classes for the elements in a type of listbox control. I'm thinking about having a parent class from which, each element inherits, with common information such as ID, title etc. But the individual elements in the list will have properties that are specific to their own type. Some will have a fileName attribute while others wont.
The parent class is handy for sorting operations and other generic tasks, but I will need to differentiate between the instances at some point in my code. Should I have a type attribute in the parent class to tell me what attributes to read for a specific instance? I don't wan't to have virtual members in my parent class that are only meaningful for some instances.
Maybe the elements don't have enough in common to warrent inheritance?! BTW, I will not have access to reflection techniques to tell me which type and instance is. Unmanaged C++ to be exact.
Thanks.
|
|
|
|
|
lclarsen wrote: Should I have a type attribute in the parent class to tell me what attributes to read for a specific instance
Down this path lies insanity. I am afraid I go back to my database for my entity definitions, if I can make a view of it then I ain't gonna build it. Taking the attributes structure too far is really difficult to support, you almost need a data dictionary just to find out what you are looking at.
I must admit I rarely use inheritance, possibly b/c I don't automatically see the connection between objects.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
lclarsen wrote: The parent class is handy for sorting operations and other generic tasks, but I will need to differentiate between the instances at some point in my code. Should I have a type attribute in the parent class to tell me what attributes to read for a specific instance? I don't wan't to have virtual members in my parent class that are only meaningful for some instances.
The code should be using helper-methods from the object, and not refer to specific properties directly.
Take the <a href="http://msdn.microsoft.com/en-us/library/system.icomparable.aspx">IComparable</a>[<a href="http://msdn.microsoft.com/en-us/library/system.icomparable.aspx" target="_blank" title="New Window">^</a>] interface; it's the object's that tell the Sort method how to compare the items in order to sort them.
Bastard Programmer from Hell
|
|
|
|
|
lclarsen wrote: don't wan't to have virtual members in my parent class that are only meaningful for some instances.
I understand your concern here, but it reminds me of a cooking expression. If you are going to make an omelet, you have to break some eggs. Yes the parent will need to implement a 'default' implementation for each, but that is just the nature of the beast.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
That's where we separate concerns using interfaces. It's not required for the base to implement all members, we can implement interfaces at a higher level. That way we don't force a specific set of members up the inheritance-chain, and still have the luxury of interacting with a part of the inheritance-set using a common interface .
Bastard Programmer from Hell
|
|
|
|
|
Chris,
I guess I was hoping you could offer some powdered eggs or something, so I wouldn't have to break any
Anyway - the conclusion seems to be there isn't really any perfect solution to this. I somehow suspected that. Thanks for the input everyone
|
|
|
|
|
You can use interfaces to get around the problem. Each of the child classes implements an interface that it needs to support. And then you can use code like this to check if you need to call some method on the child items.
ItemBase item = listControl.Items[x];
if (item is IFileItem) {
IFileItem fileItem = item as IFileItem;
fileItem.Save();
}
|
|
|
|
|
lclarsen wrote: I'm in the process of defining some classes for the elements in a type of listbox control.
This is a display problem.
lclarsen wrote: The parent class is handy for sorting operations and other generic tasks, but I will need to differentiate between the instances at some point in my code.
This looks like it isn't a display problem.
So two possibilities exist.
1. The logic really has nothing to do with the display problem. So what is the problem?
2. The logic is about display. Then it is simple, don't mix display logic and business logic.
|
|
|
|