Looking for a tutorial/design-pattern for Manage User and Permissions.
Hello,
I wonder if anyone knows a good tutorial/blog with reference to security - howto Manage Users and Permissions.
In my application I have GROUPS and each group has access to different RECORDS and CASES.
Example:
Groups: Alfa, Beta, Gamma
Record: R1, R2, R3...
Case: C100, C200, C300
Group Alfa can view: R1, R2 and C300
Group Beta can view: R1, R3, C200, C100, C300,
Group Gamma can view: R3
My question is this: what should be the best way (design-pattern?) to force a policy to securing the Records/Cases?
What should every case/record implemented to verify that a user (part of a group) has the right to access the entity.
Thank You!
Sorry if this one is too basic for you but as I do not know your level of experience try:
http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt3_print.html
HTH
There are also many other tutorials on:
http://www.adobe.com/devnet/dreamweaver/application_development.html
Similar Messages
-
Design Pattern for Controlling Uniqueness
Hi,
I'm looking for a good design pattern for controlling uniqueness. E.g. I have classes representig a particular database relation. The constructor has the database key(s) as parameter(s). For the other attributes there are corresponding setter and getter methods.
How can I make sure, that I have only one instance with key(s) foo in my system?
Of course I have some ideas but I'm not sure if that is the best thing I could do. So I could use a map, to map the keys to the tuples.
This map could be in another class foo2 which creates the objects of foo1 (which has only a protected or package-private constructor).
Or I could place the map into foo1 itself as a static variable, and add a static factory method. The constructors would then be protected or private. Are these solutions good? Which one to prefer?
How can I handle other unique attributes (not part of the key)?
The equals method for such a class could then test the keys only, since there is only one object with such a key in the system, right?
Thanks for any help.
Greets
PuceThe class could have only private constructors and a public static getter method, which would decide based on some collection of the object created so far, whether to create a new one or give an old one.
-
What is the best design pattern for this problem?
No code to go with the question. I am trying to settle on the best design pattern for the problem before I code. I want to use an Object Oriented approach.
I have included a basic UML diagram of what I was thinking so far.
Stated simply, I have three devices; Module, Wired Modem, and Wireless Modem.
In the Device Under Test parent class, I have put the attributes that are variable from device to device, but common to all of them.
In the child classes, I have put the attributes that are not variable to each copy of that device. The attributes are common across device types. I was planning to use controls in the class definition that have the data set to a default value, since it doesn't change for each serial number of that device. For example, a Module will always have a Device Type ID of 1. These values are used to query the database.
An example query would be [DHR].[GetDeviceActiveVersions] '39288', 1, '4/26/2012 12:18:52 PM'
The '1' is the device type ID, the 39288 is the serial number, and the return would be "A000" or "S002", for example.
So, I would be pulling the Serial Number and Device Type ID from the Device Under Test parent and child, and passing them to the Database using a SQL string stored in the control of the Active Versions child class of Database.
The overall idea is that the same data is used to send multiple queries to the database and receiving back various data that I then evaluate for pass of fail, and for date order.
What I can't settle on is the approach. Should it be a Strategy pattern, A Chain of Command pattern, a Decorator pattern or something else.
Ideas?elrathia wrote:
Hi Ben,
I haven't much idea of how override works and when you would use it and why. I'm the newest of the new here.
Good. At least you will not be smaking with a OPPer dOOPer hammer if I make some gramatical mistake.
You may want to look at this thread in the BreakPoint where i trie to help Cory get a handle on Dynamic Dispatching with an example of two classes that inherit from a common parent and invoke Over-ride VIs to do the same thing but with wildly varying results.
The example uses a Class of "Numeric" and a sibling class "Text" and the both implement an Add method.
It is dirt simple and Cory did a decent job of explaining it.
It just be the motivation you are looking for.
have fun!
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
The search for a perfect design pattern
The search for a perfect design pattern
I am searching tip to upgrade a labview program used. I am looking for the best approach to make
my program more robust and scalable.Software and hardware.
Today the system consists of :
GPS, weather station, ultrasound wind sensor, echosounder and a webcamera, all connected to a computer.
The computer OS is XP pro with Labview version 2009 installed. Except for the webcamera all peripherals have serial communication interface.
The webcamera interface is ethernet.
Device Data type Interval Interface
GPS NMEA string 1 second Serial rs232
Ultrasound wind sensor NMEA string 1 second Serial rs232
Weather, temp,humid NMEA string 35 seconds Serial rs232
Echosounder NMEA string 500ms-5 seconds Serial rs232
(depending of depth)
Webcamera Jpg Snapshot on demand Ethernet
The tasks to be solved
All the data have to be stored.
All the data have to be displayed in real time.
Weather history data must be buffered to be plotted in a graph (pop-up windows).
Absolute wind speed and direction have to be calculated.
Option to send navigation data attached to email at desired time intervals.
Image snapshot at desired time intervals.
The data wich streams into the serial ports are not synchronized and vary in intervals . Would it be a good idea to put all the serial peripherals into a serial device server. Is it possible to let the server place a event in my software, to trigger reading of the data, from the the server. Or how could that be done in other ways?
The perfect design pattern
In version one of the software I use 4 parallel loops to read data at the serial ports, inside these loops the data was separated and outputted to a datasocket server. I used datasocked read in other loops to present and store data. But it did not look good, and yes it was a mess, a really rat nest. I am looking for a better design pattern.
Could some kind of producer/ consumer pattern be the way to go?
Comments and tips are wanted.
TIKNice Project! Congratulations ;-)
I am not an expert for large applications. But your project looks nice and manageable. Here my straightforward ideas:
I would build a GUI, with menu bar, pop-up graph display thing.
THen low level tasks with each one handling a RS232 device and feeding queues or fireing notifications.
Maybe handle the snapshots in an event structure on the GUI blockdiagramm.
When GUI and producer tasks are running, close the gap with a middle layer which captures the data and actualizes GUI by reference. For instance the graph-thing-dialogue triggers a "flush queue" and displays the last 200 entries of the array of data.
I often run into issues when having defined too many userevent structures. I guess i am too stupid for that. Thats why i rather use queues (when i dont want to loose data) or notifiers (data is up-to-date). Nevertheless I like a "stop-all-tasks" user event...traditionally.
My team is actually developing a large application. We are using LabVIEW classes and objects.
So have fun!
Yours
RZM -
Is there a design pattern for this?
I'm looking for a solution to a design problem I have.
For a restaurant booking system I need a number of different opening times describing when you can and cannot book. These opening times are essentially Jodatime Period objects. There's a set of opening times spanning a week and these are repeated for every week (a default set of opening times) however it's possible to override these opening times say for a specific day.
The domain model would be something like a Restaurant class holding 2 Lists of OpeningTime objects one for defaultOpeningTimes and the other for overiddenOpeningTimes the overidden ones get used if they exist for the requested time period. However the database model would be a bit messy as I'd have 2 lists mapping to the same table (OpeningTime). Is that a good idea? Perhaps there's a design pattern for this, if someone could point me in the right direction I'd be very grateful, or perhaps this is the best solution? Thanks!jduprez wrote:
But why do you put the logic in the database too (I'm no DB expert and I didn't know these concepts until I read your post, but that's what a dynamic view based on derived values looks like to me): performance (1 round-trip instead of two)?Hi jduprez. Long time no speakee.
I guess part of it is that I spent many years as a DBA and modeller, and really appreciate what it's taught me about design. Also, databases are (or should be) designed from the ground up to provide data-directed requests optimally, and include all sorts of nice stuff like transaction handling that aid consistency, as well as speed.
That said: I HATE SQL. Think Coliseum, with that emblazoned in 60-foot high letters around its walls, and it might come close to just how much I hate that so-called "language". I hate its form; I hate it's inconsistencies; I hate the fact that something like what OP is trying to do is NOT an easy task (and might involve the creation of a table that simply contains Dates, just in order to satisfy Boolean logic).
However, once you work it out, a database view (at least from the database's standpoint; JDBC I'm not so sure about) is just like any other Table - and that I DO like.
Programs are good at processing parameterized (ugh) temporal information; databases are good at persistence and high volume. Those two may meet at some point, but I reckon it's going to take another Codd (or Joda) before it does.
- that's clearer to 90% of the dev team (my biased numbers, based on 50% of Java developers having decent knowledge of SQL and much less than that having the advanced SQL knowledge which I rank your suggestion at)Sounds to me like you'll get the solution that matches the skills you have then. Is that what you really want, if a better one is available?
- that doesn't require investigating the if of your suggestion (JDBC support)Agreed, but only because my JDBC knowledge isn't what it could be. I'd also be surprised if it doesn't support access to a named view, since they were designed to be equivalent to Tables.
- the Op is using DAOs, so it's possible, if profiling does show this is hampering performances, to change that with no impact on the client code that calls the DAO.There's no doubt that a database solution is much higher level than a programming one; but, as I said, it's what they were designed to do. And tinkering around with program optimization has the feel of a "hacker's solution" to me. Not that there's any particular problem with that - I do it quite often when I have no control over my source - but I also try to keep in mind what the "actual" problem is.
Winston -
Design Pattern for execution queue
Anyone know of any good design patterns for using a JMS Queue and MDB's
as async
execution queue which maintains execution order by some key
Enforced ordering on redelivery will be supported in the
next release, but only if the application clamps the pipe-line
size down to its minimum and the MDB pool size down to one.
I don't think enforced ordering is supported in the current release.
We are looking at least partially addressing the general design
pattern below in the release after next. I don't think I can
get away with being more specific. (Sorry.) Currently, I
think something along the line of Larry's solution is the only way to
accomplish it. Interestingly, the recent thread started
by "[email protected]" on correlating requests and responses
seems to be somewhat related.
Tom, BEA
Larry Presswood wrote:
> Well you are both correct however we have something which works
> however it does involve some threading primitives which generally is not
> a good idea
> inside wlas but seems to work.
>
>
> Generally have a singleton on the server which has slots for each key
> with message
> numbering for each message and force a wait if message for key is out of
> order
> during fifo processing rules. IE do what things you can do in parallel
> but gate for
> the last step.
>
> I think there is a general remote execution pattern out there.
>
> The general problem to solve is this:
>
> In a messaging system you want to process messages for each key/session
> in order however
> with a large number of sessions its possible to parallel messages for
> different sessions
>
> Otherewise you can either create custom queues or a topic with a
> selector and then
> create custom consumers which does not behave as well from a resource
> perspective
> as MDB's do.
>
>
>
>
>
>
>
> Nick Minutello wrote:
>
>>I may be completely wrong - but I think that Larry is referring to the inherant
>>out-of-order message consumption that you get when using MDB pools to consume
>>from a Queue.
>>
>>In short, the only design pattern here is to deploy the MDB to only one machine
>>in the cluster - and set the pool size to 1.
>>
>>In-order execution is incompatible with the parallel execution that MDB's give
>>you.
>>
>>-Nick
>>
>>
>>
>>Tom Barnes <[email protected]> wrote:
>>
>>
>>>Hi Larry,
>>>
>>>Generally, I think it is best to have a seperate queue per key if the
>>>
>>>number of keys is small. This prevents starvation of a particular
>>>message. For example when handling message-priority, low priority gets
>>>
>>>an MDB pool of size 1, high priority gets and MDB pool of size 10.
>>>
>>>Note that WebLogic JMS allows a queue to specify a sort-order keys based
>>>on arbitrary message fields. Note that the in-flight message pipe-line
>>>
>>>between server and asynchronous clients is unsorted.
>>>
>>>Tom, BEA
>>>
>>>Larry Presswood wrote:
>>>
>>>
>>>>Anyone know of any good design patterns for using a JMS Queue and MDB's
>>>>
>>>>
>>>>as async
>>>>execution queue which maintains execution order by some key
>>>>
>>>>
>>>>
>>
>>
>>
>
-
Design pattern for several conditions
Hi;
I would like to implement an search algorithm which use many conditions (search criteria).
For Example
Begin :
If criteria A && B are OK => if criteria C is OK => etc...
Else criteria D && F are OK => if criteria C is OK => etc...
Else etc...
which design pattern or another design correspond to my requirement ?
Regards;You are missing the point somewhere. Object-oriented design patterns are tools used to design object-oriented applications. There is a certain limit to size that is associated with warranted usage.
In other words, the issue of your post is a trivial element of conditional processing. There is no such design pattern to apply to such a thing because that is not what design patterns are used for.
Aside, some forum "genius" is going to post some application of a design pattern to this issue and then call me crazy. Looking forward to it :o)
Your question would be better suited if it asked for what type of conditional processing algorithm might work well. In Java there are a few to work with. If statement, do while statement , while statement, case, etc. -
Design Pattern for Role-based GUI
Hi,
I'm looking for a java design pattern to provide different GUI according to the user role.
For example, If logon user has general user role, the GUI would disable some administrator related menu items...
I think, this kind of functionality is now in use at many applications..
Thanks in advance..
HabinHi
I try to explain with some more detail (sorry for my bad english) :
I write a complete hotel reservation app with Java+Bd (relational). This app is used by diferent users types.
The administrator has all privileges (can do every action) and other users can do only some actions (make a reservation, check-in, check-out etc but not modify a
room price for example).
The app is a MDI app, there are a menu and menuitems
and when a user do an actionEvent over a menuItem an InternalFrame is activated and so on. These InternalFrame make possible some actions at app level (ex. : do a check-in).
The menuItems set is controled by the App (is the Controller in MVC design pattern) and the model is represented by a set of user possible actions; so there are a class (UserConfig) with these set of possible actions.
the Controller ask UserConfig abouth the posible action
set and do the enable/disable job. There are a 1 to 1
relationship : each possible actions has a menuItem. And
there are a M to N relationship from User/Action perspective.
With this design (I think is an MVC design) the Controler mantain a UserConfig (via a Relational Database) and the Administrator (via the App) can create or modify the UserConfig objects.
At implementation level, each menu item has a name, and
for each registered user there are the name/id_user pair
of actions. These info (stored in BD) is used to create
the UserConfig objects (via username/password).
Bye -
Design pattern for unprotecting and reprotecting sheets with VBA?
Many macros can't run when a worksheet is protected, so when I develop an Excel workbook that has protected worksheets, I have to unprotect worksheets when macros are called and then reprotect the worksheets once the macro has completed.
The current design pattern I use for this is the following:
I look at each procedure individually and consider which sheets need to be unprotected for it to run. Then in each procedure I write:
Sub Test()
Dim bSheet1Protected as boolean
Dim bSheet2Protected as boolean
bSheet1Protected = Sheet1.ProtectContents
bSheet2Protected = Sheet1.ProtectContents
bSheet1Protected.Unprotect
bSheet2Protected.Unprotect
'''The rest of my code
if bSheet1Protected then Sheet1.Protect
if bSheet2Protected then Sheet2.Protect
End Sub
But I imagine that maybe there are better ways of doing this. What is your preferred design pattern for unprotecting and reprotecting sheets with VBA?Hi JP3O,
I think it is a good practice to unprotect the worksheet before execute some code and protect it back after the code execute finished.
>>But I imagine that maybe there are better ways of doing this. What is your preferred design pattern for unprotecting and reprotecting sheets with VBA?<<
I am not able to find a better way since we always need to unproect the worksheet if some code didn't not executed successful when the worksheet is proected.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Flex design pattern for BlazeDS transfer objects
Dear Community,
I have a question regarding the nature of objects transferd from BlazeDS backend to the Flex client.
According to some adobe docs all the presentation logic should be in flex and BlazeDS should provide only services.
The question is what kind of transfer objects should be used? with what level of abstraction?
To make it more clear let's talk about a simple forum application like adobe forums.
I have created a Forum service, which returns a Forum transfer object, which has a List of Threads, with each thread having a List of Messages.
Flex gets the Forum transfer object and does all the presentaiton work.
This is a very nice seperatin of concerns architecture BUT there are two major performance issues:
- when the forum becomes bigger the transfer object will be huge
- the flex will use huge client resources to create the presentation of the forum transfer object.
So my question is what is your strategy/ design pattern for such a problem.
An obvious answer would be create services that include the presentation logic and use transfor objects like ThreadListPage which will include only the first 10 threads.
Thanks in advanceI think you are going to get a few varied types of answers to a general question like this, but I will comment on a few things. First, you should only be transmitting the data that you need to use or display to the user at the time. If this forum was implemented in Flex (I wish) you wouldn't transfer the text for all the threads. You might not transfer the thread text at all (just the subjects), you'd make calls back to the server to fetch that data when and if you need it.
Also, I think you are overestimating the resources required for the Flex "presentation layer". If you think about it, these workstations we have here are pretty idle most of the time when you're at a website. Nowadays there's plenty of processing power just sitting there waiting, so as long as your design isn't flawed the CPU or memory are rarely going to be a bottleneck with Flex.
The way I design, BlazeDS (or GraniteDS etc) should mostly just be "serving data". There is some flexibility available, for example I don't see a problem with putting certain types of business rules (such as a limit on the number of results that can be recieved in a search) within server side code, and validation rules on the Flex side. So there's not too many "industry standards" in Flex yet beyond maybe what's done in the various standard architectures, at least not that I'm aware of.
You might find it beneficial to look into some of the various frameworks/architectures available like Cairngorm, Mate, Swiz, and so on. Learning how they work (looking at examples) would probably answer some of your questions too. -
What is the best design pattern for top-down ws development..?
Hi,
What is the best design pattern for top-down development+ wsdl2service....?elrathia wrote:
Hi Ben,
I haven't much idea of how override works and when you would use it and why. I'm the newest of the new here.
Good. At least you will not be smaking with a OPPer dOOPer hammer if I make some gramatical mistake.
You may want to look at this thread in the BreakPoint where i trie to help Cory get a handle on Dynamic Dispatching with an example of two classes that inherit from a common parent and invoke Over-ride VIs to do the same thing but with wildly varying results.
The example uses a Class of "Numeric" and a sibling class "Text" and the both implement an Add method.
It is dirt simple and Cory did a decent job of explaining it.
It just be the motivation you are looking for.
have fun!
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Choice of design pattern for data acquisition system
Hello all
I have a trouble about selecting the suitable design pattern / architecture for a data acquisition system.
Here is the details of the desired system:
There is data acquisition hardware and I need to use it by observing parameters on User interface.
the data acquisiton period, channel list to scan should be chosen on User interface. Besides, there are many user interface interactions. e.g. if user selects a channel to add scanlist, then I need to enable and make visible some other parts on user interface.
When user completes the channel selection, then he will press the button to start data acquisition. Then I also need to show the scanned values on a graph in real time and log them in txt file.
I know that I cannot use producer consumer pattern here. because the data acquisition loop should wait for parameters to scan channels. and it works in a given period by user. so the user interface loop performs higher rate then consumer loop (data acquisition loop). it means queue will be bigger bigger. if I use notifier it will loss some data come from user interface.
is there any idea about that ? is there any suitable design pattern for this case ?
Thanks in advance
best regards
Veli BAYAR
Embedded Systems Software and Hardware Engineer
"You live in a graphical world. Why not program in one?"
Solved!
Go to Solution.johnsold wrote:
Veli,
I recommend the Producer/Consumer model with some modifications.
You might need three loops. I cannot tell for sure from your brief description.
The User Interface loop responds to the user inputs for configuration and start/stop of acquisition. The parameters and commands are passed to the Data Acquisition loop via a queue. In this loop is a state machine which has Idle, Configuration, Acquisition, and Shutdown states (and perhaps others). The data is sent to the Processing loop via a different queue. The Processing loop performs any data processing, displays the data to the user, and saves it to file. A notifier can be used to send the Stop or shutdown command from the User Interface loop to the other loops. If the amount of processing is minimal and the file write times are not too long, the Processing loop functions might be able to occur in the Timeout case of the UI loop Event structure. This simplifies things somewhat but is not as flexible when changes need to be made.
I am not sure that a Design Pattern for this exact setup exists but it is basically a combination of the Producer/Consumer (Events) and Producer/Consumer (Data) Design Patterns.
Lynn
Check out this thread: http://forums.ni.com/t5/LabVIEW/Multiple-poll-case-structures-to-event-help/td-p/2551309
There are discussions there about a 3-loop architecture that may help you.
Jeff
Jeffrey Zola -
Design patterns for Dynamic Class Loading
Hi,
I have to develop a program for uni that dynamically loads classes based on names in a text file. All the classes subclass an abstract class with a constructor that takes one argument. This means I can't use the Class.forName(className).newInstance() method of class loading. I have researched some design patterns I could use and have come up with the following 3:
Factory pattern; "Robocode" pattern (not it's real name, but Robocode uses it); and, the "one I made up myself" pattern.
The robocode pattern instantiates a class using the default no-argument constructor then immediately sets all properties that shoud have been provided in the constructor:
Object o = Class.forName(myClass).newInstance();
o.setProperty(property);Personally I think this is ugly and a cheap fix instead of doing it properly.
My own pattern finds the constructor that takes the arguments I need then calls it to create the object:
Class c = Class.forName(myClass);
Constructor cons = c.getConstructor(new Class[]{Class.forName("java.lang.String")});
Object o = cons.newInstance(new Object[]{"hello"});What's the best to use? Are there any other patterns I should consider?My own pattern finds the constructor that takes the
arguments I need then calls it to create the object:
Class c = Class.forName(myClass);
Constructor cons = c.getConstructor(new
Class[]{Class.forName("java.lang.String")});
Object o = cons.newInstance(new Object[]{"hello"});
I have followed this basic 'pattern' several times though I would use
Constructor cons = c.getConstructor(new Class[]{String.class});
It works great. -
Design Pattern For Web Services.
I tried asking siomilar questions in WebService Forum but didn'y got any replies.
Can anybody tell me what should be the Design for Web Services.
I have understanding that there can be just 1 Interface/Implementation class for each Web Service, and which will have 1 end point.So for evry such Interface we will have to have 1 Web Service.
Can someone please clarify wheather I'm correct or not ?
I guess that If my application has many Interfaces and I have to expose the application as Web Service.Then I will have to expose all methods from one Interface and then expose this new Interface as Web Service.
Is this how WS will work.
Any pointers to design PATTERNS for Web Service will be highly appreciated.
Thanks
RahulI don't know if anyone has documented new patterns specifically aimed at web services but the old ones definitely apply. Like you were alluding to, there is a letter-envelope decoupling of interface and implementation with the XML WSDL interface and coded implementation.
-
Hi,
I am new to Oracle IFS. I just want to know Is there any proven design pattern for IFS application development.The class could have only private constructors and a public static getter method, which would decide based on some collection of the object created so far, whether to create a new one or give an old one.
Maybe you are looking for
-
I just started shooting with a Sony A6000 and couldn't import the photos due to compatibility issues with my current version of lightroom (4.4). After reading about it on the forums I found that I had to either download LR5 or use the DNG converter
-
Action multiple OM objects in one Form
Hi Experts, The OM Processes & Forms include a number of standard forms in system such as: - Create Position - Change Position Attributes - Create Org Unit - change Org Unit These forms work on one base object and they process the form. We have 2 req
-
Insert query in JDBC Reciever adapter!!!
Hi All, We have an interface in which we are inserting data in Oracle server using JDBC Reciever Adapter. The interface ends up in error on adapter engine level whenever the we are sending long data in one of the field of target structure. The error
-
Is there anyone having trouble copying itunes music to their psp?
i'M trying to copy my music library onto my psp(using a 4gb memory card from datel)but only certain songs copy about 79 out of 960. Does anyone have any ideas as what this could be?
-
Cover browser bar looks scrambled
Whenever I switch itunes to show the cover art with the browser bar, the cover art shows up but the browesr bar just looks like a scramblez TV picture. How can I fix this?