-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Knowledge base page #50
base: master
Are you sure you want to change the base?
Knowledge base page #50
Conversation
Nice work @stevelaskaridis! I like your enthusiasm 😄 A couple of questions:
|
Hey guys! Happy new Year! a couple of points :
@stevelaskaridis you can
def initialize(attrs)
@title = attrs[:title]
@url = attrs[:url]
# ...
end
def self.all
presentations = [
{:title => 'git and GitHub', :url => 'https://github.com/thessrb/meetup/blob/master/meetups/2/presentations/gitAndGithub/AppCampGr2011Preso.pdf?raw=true', :date_presented => '06/09/2011', :presentor => 'Petros Amiridis'},
{:title => 'Simple Web Apps with Sinatra', :url => 'http://prezi.com/de5yqj9sa9zq/simple-webapps-with-sinatra/', :date_presented => '06/09/2011', :presentor => 'Vassilis Rizopoulos'},
# ...
]
presentations.map do |presentation|
Presentation.new(presentation)
end
end
Bonus step: Open a new Issue or separate Pull Request to do the same with the Oh! @stevelaskaridis thank you very much for the contributions AND the very active participation! |
Happy new year from me as well! @petros, answering to your 1st question, the model (presentation) is more specific than the knowledge page and its equivalent controller. This page could potentially include non-presentation stuff, such as links to code repos or infographics, which do not constitute presentations in the strict sense, nor do they would they share the same attributes. As a result, I opted for this distinction between model and view/controller. @xarisd, I believe that the aforementioned argument addresses your 1st point as well. Moreover, I understand if you don't want to involve the database yet. I guess I could make some minor changes to "fix" that. |
That's an interesting idea, and I am glad you are trying to design a system that can be easily extended! However, I still encourage you not to do that 😄. I know, it's contradictory, but when I design something, I prefer not to get ahead of myself. I prefer going through all the steps of a process without jumping ahead—skipping steps. I generally embrace refactoring, and I prefer spending time to make a system easy to refactor—by adding tests for example—, rather than trying to think of all the possible ways a system might be extended in the future, and try to implement that in one go. Of course, it's a game of balance. It doesn't have to be simpler than how simple it should be, but still I prefer all of us to err on the side of simple. Having said that, I suggest you stick to PresentationController, and Presentation model. If we need to add more similar things in the future, and have a page that lists the different entities, we may choose different ways to implement that. An example might be to have a Knowledge model, that's an interface, and then have various models, like Presentation, that among other things, have to implement various methods/attributes. What we want to avoid generally is the code smell of having a lot of But we don't have to worry about that, until the time comes to worry about it ;).
That's a great idea, especially if we are ready to start covering ActiveRecord. Maybe @xarisd can comment here. I still prefer first doing it without a database, and then adding the database, because it would be really useful as a teaching tool for people that will check the history of changes. It will also help you if you want to present ActiveRecord, because you will be able to show the transition between not using a database, and using one. |
Hi there! We should continue WITHOUT ActiveRecord for the time being. I totally agree with @petros. @stevelaskaridis you can prepare a presentation on ActiveRecord at a later stage (a couple of meetups later). We have two or three things to cover until then, all of which are related to Views and Controllers. I want to mention that @gmanolis also offered to cover this topic, but since it is a big one we can schedule more than one presentations/sessions for it. And a comment on "Knowledge Base vs Presentations" issue: For the time being we do not have anything else to show on a "Knowldge Base" page so we should stick to a "Presentations" page. So to recap...
We will go there...I promise, but let's not forget that this is an educational project. |
Created a 3rd page in the webpage where the presentations available from past meetups are presented to the user.
More specifically:
Of course, if additional presentations are available, they could be included in the database and rendered in the relevant view.
Screenshot preview: