UML - Use case scenarios & data dictionaries [closed] - documentation

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am currently working for a company writing use cases. They have a template which mixes them with data dictionaries. I've never seen this kind of template. I searched the web looking for answers. I am wondering if this is a correct practice/method. If it is, does this template have an specific name? They are calling it use case template, I do think is wrong to call it that way.
This is an example:
Note: This template has a valid use case written above of it (not shown in here).
Step: 1
Actor: Application
Action:
Display login page
Login page section has the following fields:
- Username
- Password
- Submit button
Here's the description of the fields for this section:
- Username - textbox field, required, no default value, allow 10 character maximum
- Password - textbox field, required, no default value, allow alphanumeric characters, allow a maximum of 30 characters
Step: 2
Actor: User
Action:
User enters username & password
User hits submit button
Step: 3
Actor: Application
Action:
The app allows access to the page.

This is common practice. I don't know if he's the inventor, but Alistair Cockburn provides such templates along with rules how to fill them in.
However, for the methodological approach and much of the background info needed in use case synthesis I always recommend Bittner/Spence. (Note: there is a Word-version of this book when you google for it. I have not idea now this infringes copyrights, but the money for the book is worth it.)

Yes, I've seen this before, but it is not common practice to specify the data requirements in such detail in the use case scenario. In fact, in your example, they are even trying to describe the user interface details in words.
I would recommend, like you expect, to have a separate data model (which is a bit more than just a data dictionary) and specify the data requirements over there. For the user interface, it would be better to create a prototype or wireframe. Too often, IT departments tend to create their own methodologies instead of buying a good book.

Related

Which routes to pick for REST API? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm developing a restful API using NodeJS. To give you a little more insight in my application:
My application has surveys. A survey contains questions which in their turn has choices.
To add a question, you need to provide the id of the survey in the body of the post. To add an option, you need to provide the id of the question.
Now for the API routes. What would be better:
Option 1
/api/departments
/api/surveys
/api/questions
/api/choices
Option 2
/api/departments
/api/departments/department_id/surveys
/api/departments/department_id/surveys/survey_id/questions
/api/departments/department_id/surveys/survey_id/questions/question_id/options
The last one seems more logical because I don't need to provide the id of the parent in the body of the post.
What is best practice to use as endpoints?
I don't think there's a "best practice" between the two; rather, it's about having the interface that makes the most sense for your application. #2 makes the most sense if you're typically going to access the surveys on a per-department basis, and also makes sense in terms of accessing questions on a per-survey basis. If you wanted to eliminate the per-department part, you'd do something that's kind of a mix of the above:
/api/departments
/api/surveys
/api/surveys/survey_id/questions
/api/surveys/survey_id/questions/question_id/options
If you DO want to go by per-department, I'd change #2 so that instead of /api/departments/surveys one would access /api/departments/department_id/surveys ...
But without knowing more about the application, it's difficult to know what the best answer is.
Do surveys contain anything besides questions? do questions contain anything besides choices? The reason I ask is that if the answer to both is no then I'd actually prefer something like this:
/api/departments/ # returns a list of departments
/api/departments/<survey-id>/ # returns a list of questions
/api/departments/<survey-id>/<question-id>/ # returns a list of choices
/api/departments/<survey-id>/<question-id>/<choice-id> # returns a list of options
or something to that effect. Basically, I like to keep the concept of "containers" and "data" rigid. I like to think of it like a file system.
So if the concept ends in an "s", it's a container (and I'd like the route to end with a "/" to indicate that it acts like a folder, but that's a nit).
Any access to "/" results in the element at that index, which of course can be another container. Similar to directory structure in a file system. For example, if I were to lay these out in a file system, I might come up with something like this:
+ /api/departments/
|-----------------/human-resources/
|---------------/survery-10/
|----------/choice-10
The choice depends on whether resources are owned or shared by higher-level resources; whether you want cascading delete or not. If owned (with cascading delete), choose option 2 and if shared, choose option 1.
If a survey is deleted, I guess you want to delete all questions and options with it (cascading delete). This matches well with option 2, because if you delete resource /api/departments/departmentid/surveys/surveyid, you naturally also delete all subresources /api/departments/departmentid/surveys/surveyid/questions/....
On the other hand, if you want the option to share questions among multiple surveys and share surveys among multiple departments, then option 1 is better.
Of course, you can also have a mix of option 1 and option 2, if some resource types are owned and others are shared.

Should a REST API select on a ID or a name field? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm designing a REST API and trying to decide which is the more correct way of returning a single resource:
/resource/{id}
or
/resource/{name}
The ID would be immutable, so I'm thinking that it would be better to select by it, but name would be more friendly looking. What is the best practice? I've seen both used before "in the wild".
Basically REST is built on top of unique IDs, thus:
GET /resources/{id}/
should be used. However, there's nothing that prevents you from making name field unique (now it behaves as plain old ID) and build REST on top of this unique ID.
If this is not what you need and name cannot be made unique, then another option is to implement filtering via name:
GET /resources?name=<SOME_NAME>
It also should be resources (plural) since it indicates that there's a collection under the hood.
Whether using name instead is practical comes down to your business case.
Will 'name' always be unique? Or will the application deal with there being more than one occurrence?
Are 'pretty' URLs important? In most applications I've worked on, querying uses unique IDs which are never exposed to the end-user, as they have no business meaning whatsoever. They are in effect surrogate primary keys.
/resource/{id} is more technically correct, but if it were me, I'd allow both. Assuming names can't contain ONLY numbers, and ids can ONLY be numbers, you could easily detect which was supplied and allow for either to be used. ;)
This is good question .. it depends on business case example if api is used through cli like docker then you might want to use user friendly ids like name
But as soon as it become part of URL it has limitations like ASCII (to avoid url encoding or loss of readability ) char only and some defined length like 128 chars etc.

What is wrong with this usecase diagram with respect to includes and extends [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Are the included and extending use cases make sense?
Basically yes, depending on what you are willing to achieve.
Include simply means that the included use case cannot exist on it's own and needs to by part of the use case, for which it is included and at the same time the basis use case won't be complete without the successful included use case.
This translated for your use case scenario will mean:
In order the user (write a name for the actor) to log in, he has to enter his User id, enter his password, the system has to parse the id and the password and display the main screen.
Extends can optionally add some other steps to the main functionality, in this case to the log in, which means that it's optional to display an incorrect log in screen (somehow verbose in your scenario). This will also mean that Display Login screen is also optional, which IMO is not the case and it has to be included in the main use case, but this is relative to what you are willing to achieve.
Advice: Learn the exact UML specification. You need to write the name of the actors, to write down <<include>> and <<extend>> and to define a system. I will suggest you to use an UML editor instead of Paint or something similar. Check What's the best UML diagramming tool?
You mixed usecase (Login) and actions of login process in one diagram.
Remove all usecases except for Login, and add activity diagram to desribe scenarion of login process.
If you create use cases at the granularity you are proposing, you will probably die under the weight of the documentation you will produce.
Here you have only one use case: Login.
In that use case you have different parts, and among those, the usual scenario steps, where you will find, for example:
1.Enter user id
2. Enter password
3. ...
you also have a section named Exception scenarios, where you will find, for example, the Failed Login details (error message, behaviour, ...).
An example of use case inclusion would be Modify Account, which would include your Login use case, meaning you cannot modify your account without login in.
An example of use case extension would be specifying different method of login in (OTP, digital signature, etc) which would all extends the Login use case.

Highlight specific column rows in Microsoft Access [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to present a list of data in an Access query and highlight specific rows which contain certain text. I also wondering if there is any great way to sort up, lets say "Transports" with different orders in groups with spaces between every unique transport.
I believe that I have to make a query and build a form for that with a bunch of macros? Or is it there any easier ways to go? Maybe any great guides similar this to follow? I'm kinda new on Access :)
Thanks for all the help, Cheers!
In Access you first design a database model by creating tables representing your entities and setting relations between them.
Then you create forms and reports based either directly on your tables or on queries. Tables and queries will very rarely be presented to the user directly in an application. This is very different from Excel, where a worksheet is the "database", the business logic (calculations), the user interface and the report at the same time. In Access you separate the data holding from the user interface (data input and reporting). It is also a good design principle to place the business logic in modules and class modules instead of "behind" the forms. Access is an application development environment and not just a tool for entering data.
In forms you can set the Allow Datasheet View property to Yes and the Default View property to Datasheet in order to simulate a table. In the TextBoxes you can use conditional formatting (Menu Format > Conditional Formatting...). Here you can define up to three conditions and formattings that will be applied when the condition is fulfilled. Together with the base formatting of your TextBox this gives you four possible looks for each column.
Grouping in forms is not possible; however, in reports you can insert several nested grouping levels and insert group headers and footers.

College/University list for populating an Auto-complete field? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm trying to create an auto-complete text field with a list of known Universities and Colleges. Do you know where I can get this sort of list? Or is there a public API that contains this data?
I've found that IPEDS (Integrated Postsecondary Education Data System) is probably the most authoritative source for this data (and tons more related to it), and it's easy to export.
That page has a bunch of different tools for exporting different sets of the data in various common ways, but they all wrap around the "Download Custom Data Files" tool which is the most basic.
For a list (rather than data on a single institution), you would go to that custom data file page, and click on "By Group" to select the actual filters to use to limit what list of institutions you want (and what year of datasets). Then you click "Search", and it will provide a sample list of your results. From there, you click "Continue" to select which variables you want in the report with each of the institutions you've already filtered down to.
There's tons of variables, but in this case, you'll find everything you need under "Institutional Characteristics" most likely. Once you've selected all of the columns of information you want, click the big "Continue" button up top. You will then be presented with a bunch of download links for your data in a few various formats including CSV.
For quick results, try http://ope.ed.gov/accreditation/GetDownloadFile.aspx - it has complete data sets ready to download with all the key information.
The US Federal Aid Application site (http://www.fafsa.ed.gov/) has a very complete list, although I'm not sure how many non-US universities are listed (some are).
You could consider starting an application and scraping the list.
After a few moments of review, I'm pretty sure that fafsa doesn't want that list used by the public or make it easily accessible to the public.
If you go to their school search form (https://fafsa.ed.gov/FAFSA/app/schoolSearch?locale=en_EN) it uses autocomplete to provide the filtered data. I didn't feel like looking for too long at the script to see if I could figure out a URI that might give the entire listing, but I'm pretty sure they don't want people using their bandwidth. I will continue looking elsewhere. I'll try to post back if I find something more like what we're looking for.
...I'm back. I found dbpedia.org as a possible source (for this & MUCH more). I also tweaked an example to list all it's universities in alphabetical order and saved the html output for my own use.
I also found
http://infochimps.com/search?query=universities
this site apparently only "deals" with datasets (some free, some not)
I'm still hoping to find a "straight up" web resource that I can ping with queries for JSON.
ahhhh what'ya gonna do!?!? 8)
You might try the Department of Education: http://www.ed.gov/developer Data is available by API call or as csv. About to build the same experience using the API endpoint so I'll update with notes.