Search function and overview page
When entering a scientific name, you should get suggestions from the scientific name database, just like when adding an animal. The scientific names have a number which are stored with the animals in order to register the scientific name. So when the name has been chosen, the code has to look in the database with scientific names to see which number belongs to that name. With this number he has to look in the database of the animals to see which animals have this number in their data and in which case also whether the column with the date of placement is filled. If so, he must show those animals by date descending. If a place name has also been entered, then the code must, if he has found an animal with a scientific name and a placement date, check which owner belongs to that animal and whether the place of residence of this person corresponds with the name in the search field. Then he only has to show those animals with and the number of the scientific name with a entered placement date of which the current owner lives in the place that was searched on descending placement date. The code must then only show certain data and a button with "View animal" that links to a page where this animal is shown. This page does not actually exist but needs to be generated with the information we already have.
Page of the animal
We know which animal should be shown and can have the code retrieve the correct data from the database. And to show x number of other animals of the same species, the code has to fetch and show them as well. Then the code must check whether the page has been found via Froglog itself, because then that person is logged in. Or via a search engine, because then that person is not logged in. This should show the correct button "Create login/account" or "Comment". Because this page also has to be found by search engines, we have to give this page different restrictions than the other pages. If someone clicks on "Login/ create an account" then the login page must be displayed so that people can log in or create an account. When the "Reply" button is clicked, the form (whether or not on a new page) must be displayed. When this has been completed, the information is emailed to the provider with the correct information in the subject so that the provider can see from the title of the mail what it is about.
Transfer or remove animal from the marketplace
If the animal is sold and transferred, the column with the placement date must be cleared. This means that we also have to adjust the code of the transfer. In addition to all the functions that are already there, it must be ensured during the transfer that that column is emptied (if it is filled, because an animal that is not on the marketplace must also be able to be transferred, of course) so that the animal cannot more is shown in the marketplace. But what if you suddenly decide you don't want to lose the animal? Then it would be useful if you could also remove the animal (or animals) from the marketplace by checking the animal and a button under "Actions" with "No longer offer animal". That button must therefore also be given the function to empty the column with the posting date.
Testing and debugging
Now that we have everything in place, it's time to put the code to the test environment. And then the testing can begin. Does everything work? Are the correct data shown? Do the e-mails arrive properly? Can the provider respond to that e-mail so that it reaches the interested party immediately. If everything is correct and working, the code can be transferred to the live version. We are now 40 hours later.
I hope you now have an idea of how much work is in it just in this little bit. Then I haven't even mentioned what we've built yet. Since we still have to do this in the free hours, you can understand that even if it's 40 hours of work, we can't design and build this in 1 week.
If you have any questions or comments, you can always contact us.
The idea, what are we going to build?
It all starts with an idea or wish, this can be from us or from a user. But that doesn't affect the process. In this case, we want to create a marketplace-like environment where users can list their animals or search for certain animals and respond here if there is interest. We want to build this so that these pages are also picked up by search engines, so these should not become closed pages like the rest of Froglog.
Now we have to think about what should be possible within this position and how it should work in practice.
To start with, users should be able to tick the animals they want to offer from the list of their own animals and with a button "Offer animals" under the button "Actions" these animals should appear on the marketplace. Users must also be able to enter a price and description when editing an animal.
Users who search for animals must be able to search a page by scientific name and place of residence. Before they start looking they see an x number of animals that are already on offer, probably the last one added?! If they have completed one or both of the searches, the correct animals and possibly those animals in a certain place must be shown. It will contain concise, but important data about the animal. In addition, there should also be a button with "View animal" that takes them to a page with more information, the price and the description. These pages must also be shown by search engines. Therefore, depending on how the page was found, via a search engine or via Froglog itself, there should be a button with "Log in/create account" or "Comment". When one is logged in and one clicks on "Reply" a page should appear (or perhaps extend on the page itself?) with the possibility to give a reaction. This must be emailed to the provider with the title "Response to scientific name + administration number via Froglog". The provider must be able to respond back via "Reply" in his/her mail program. Only if the provider agrees can he/she email his/her contact details to the potential buyer. No contact details may be shown via Froglog, only the place of residence of the provider to make it easier to search in your own environment. It is also nice to show an x number of offered animals with the same scientific name.
What all needs to be adjusted and made?
Now that we know how everything should function, we have to look at what needs to be adjusted and what needs to be built.
To start with, the database in which the animals are stored must be expanded with extra columns. Namely one for the price, one for the description and one with a date on which the animal was put on the marketplace. With the latter we can check whether an animal is offered. If it is filled, it is offered, if it is empty, then it is not. Also, when editing an animal, the fields must be expanded with a field for the price and description. These must of course also be stored in the database when saving.
Then the button "Actions" must be expanded with a button "Offer animals" with a function to provide all animals that are checked in the database at that time with the date of that day and a time.
So, now animals can be offered. Now we need to make sure they can be shown and found. So 3 pages have to be designed:
These designs must be converted to HTML so that they can also be used, mobile devices must also be taken into account. Once the pages are converted to HTML we can start building the functions/actions.