Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

d-clef

Members
  • Joined

  • Last visited

Everything posted by d-clef

  1. Hi there. I've just published a new version of my site, www.openclassical.com, and welcome your thoughts. I've been building it for around a year and a half now, and its goal is to organize the composers & their music behind an interface that's easy for a newcomer to navigate. Further, the site pulls in YouTube movies for each work, so you can listen to almost anything we've indexed. The site has several features, which are: Front Page - an aggregated 'Top Hits' of all time by genre (orchestral, vocal, etc) Composers Index - a list of all composers, partitioned by historical period Timeline - an interactive graphic of the lifetimes of the composers Composer Top 10 - top works (by our traffic) for each composer Composer Complete Works - a list of all their works (where we have cataloged it - not all composers yet) Composer Analysis - a graphic of their productivity over their lifetime Work Page - our page that integrates YouTube, IMSLP, and other meta-data for each work We have a lot more planned for the future of the site, and this new release is hopefully a step in the right direction. All constructive feedback welcomed. Thanks! -David
  2. Thanks PietPuk - I have a lot of exciting ideas planned for the site, which I do hope will be realized over time. Right now I'm building out localization code (Korean being the first translation of the site!) so that I can broaden my audience, and get more feedback. One step at a time! Mobile devices are definitely on the todo list. I recently plugged in Google Analytics to the site, so I'll have great breakdowns of what device types are visiting the site. I'll have to decide at that point if I want to adapt the site to be generally 'responsive', or build bespoke versions for each phones & tablets. I'm not sure the layout of my site lends itself to a masonry approach, but it's an interesting thought!
  3. Hi AnnaMaria012 - thanks! Actually I am open to all ideas regarding the visual layout (which at this time is largely functional, as I continue to build out the features of the site), and I am curious if you would like to elaborate on what you mean. I personally prefer a clean presentation, which I hope guides the visitor's eye to the most important functionality on each page. If you have specific sites / designs in mind that you could share that would be appreciated.
  4. rallport - thanks for the reply. I fully appreciate that when it comes to coding there are many ways to get things done, so if includes & template frameworks are your preference, that's fine. Coming from a C++ background I have pretty firm notions about what is an include, and what is a function, and using an include to essentially execute code mixes things up in my head unnecessarily. I'm afraid I don't see an actual benefit to using an include over a function, which would of course help to persuade me. Twig looks interesting - thanks for the link! Regarding the function I provided as an example, the reason I don't pass in the entire $composer object by the way is because that function is designed to be used site-wide, which includes front-page, composer pages, composition-pages, data-editing pages, and so on.
  5. d-clef replied to sergRamalli's topic in Server Side
    You'll need to detail your redirect a bit more, but I found that providing the full explicit link solved a similar problem I had, so you should redirect to the complete: http://www.yoursite.com/example.php and it should work. If this doesn't fix the issue, please paste your actual redirect code.
  6. Hi Icot. You are asking some great questions, which I came across myself when moving from static websites to building more data-driven sites. There's a couple of pieces you need to make this work. The notion of a template is essential. My own project, www.openclassical.com, depends heavily on this approach. It's a site that manages some 1,000 composers, and many thousands more compositions - so far. The majority of pages on the site are generated by the interaction of a handful of php files and a database. As an example, you can see my page for Beethoven: https://www.openclassical.com/composer/Ludwig_van_Beethoven. I have a php file called composer.php, which takes the composer "string" identifier from the URL, one of the things you ask about. This is done (on an apache server) via mod_rewrite. This looks fairly daunting initially (at least it was for me), but if you know what you need to use it for, you can quite quickly put together what you need. A good tutorial is here: http://www.elated.com/articles/mod-rewrite-tutorial-for-absolute-beginners/. For my Beethoven page mentioned above, the following code in my .htaccess file transforms the url into something my composer.php file can then process, with the "link" parameter now containing the composer name string: Options +SymLinksIfOwnerMatch RewriteEngine On RewriteRule composer/([^/]+)$ /composer.php?link=$1 This transforms https://www.openclassical.com/composer/Ludwig_van_Beethoven into https://www.openclassical.com/composer.php?link=Ludwig_van_Beethoven In the php file, I can grab this parameter from the URL as follows: if(isset($_GET["link"]) && (strlen($_GET["link"]) > 0)) { $linkToPage = $_GET["link"]; } else { myLog("link was not provided."); exit; } From this point, my composer.php file knows which particular composer to generate the page for. In my case, I now hit a database, as each composer has a great deal of associated data that would be harder (and slower) for me to manage in separate files. However in your case a separate file would be fine; data is data. I have several utility php files, such as html_utils.php that I use to generate my html header & footer code, user_toolbar.php which genarates a toolbar for the visitor, and so on. The key point here is that composer.php is my template, but it's really a large php script that runs to generate the html code, and I break out common functions as much as possible, for maintainability and easy re-use. So there's no specific 'template' functionality or technology that I use, just php functions broken out into separate files. The key step is to figure out the inputs via the URL, then make sure that the ensuing code is appropriate for all possible inputs. Finally, my personal preference would be to avoid using 'include' as a way of having php code executed - I would rather wrap the desired functionality up in a function (in the same file you would include), then call the function. For example, I have a function to generate html for the document opening, which I give the function signature as follows: function printDocumentOpening($title, $description, $cssFiles, $scriptFiles, $bodySetupFunction, $additionalKeywords = NULL); Once my php file knows what to do regarding data, it calls this function as follows: printDocumentOpening( htmlspecialchars($composer->pageTitleDisplayString), $pageDescription, array("composer.css", "composer_all_works.css", "composer_analysis.css", "composer_catalogs.css", "composer_top_ten.css"), array("composer.js", "composer_all_works.js", "composer_analysis.js"), "setup", array( htmlspecialchars($composer->pageTitleDisplayString), htmlspecialchars($composer->periodName))); I can then call this function with different parameters as I need. I find doing this via an "include" counter-intuitive, as my coding background is more grounded in object-oriented development, such as C++; making things happen via includes is harder to extend, and you can't parameterize it - except by depending on implicit global variables you should declare prior to the include that the included file then has access to ... ugh! As your project develops in complexity, this approach will quickly lead to much head-scratching & bug-hunting, which a more function-oriented approach will avoid. Hope that helps! -David
  7. One other nicety you can do is to add a little javascript to the form itself, so that if any required fields are not filled out, you can catch this on the client side before sending incomplete data to the server. I do this in my current project, and if a field is not filled out, my js code intercepts the submit, turns the empty fields red, and waits for the user to try again. You can see my code here: https://www.openclassical.com/scripts/contact.js The trySubmit() function is of interest. I think this is especially important with regard to the email address field on most forms - I want to ensure they enter something, so I can hopefully respond to them.
  8. d-clef replied to sergRamalli's topic in Server Side
    Yes, start with the php documentation and try out the apis, probably starting here. For my current project I actually need dates earlier than 1000AD, which is the earliest date mysql allows in its DATE type. Using an integer value, in the format of YYYYMMDD - for example 20130609 representing today - allows accurate date comparison, and I can go back as far as I want to year zero. For time values I store the time as seconds. I have two functions, secondsToTime and timeToSeconds, which are fairly simple to write. The last place I worked (a very large financial software company) followed this practice in general, so that's where I picked it up. If you want to support more sophisticated functionality, it may be better to leverage an existing api, for example if you need to support timezones, daylight savings (which differs by country) - this gets painful very quickly! However most of the time it's faster and simpler to store these two things as separate integers, and manage them on your own.
  9. Hi teodora! Thanks for the welcome. HighDarren - so pleased to hear your comments. Arrangements of different pieces is definitely something I'd like the site to formally track in the future, and we kind of pick this up already in the YouTube videos we list. By the way I went ahead and updated Pachelbel since you mentioned it - you can see the page for the Canon here: https://www.openclassical.com/composer/Johann_Pachelbel/work/canon_in_d?play_movie=H1L4sVxuKZg again, do let me know if you have any other comments or feedback.
  10. 4li4s - I haven't considered the footer for quite a while, and I do agree with your comments. I'll update that soon. Thanks! Lev - thanks! By the way I just added lots of Schnittke works per your comment. Both he and Denisov were listed under 'minor composers', and Denisov remains there for now - it's just a logistical thing as I update each composer one at a time. You can find Schnittke's updated page here. Pretty awesome music. extincted & Nillervision - thanks for the welcome and the kind words!
  11. Thanks 4li4s! I'm also looking forward to jumping into the occasional thread when I feel I might have something to offer (I consider myself more of a musician than a technologist). Do feel free to let me know if you have any comments or suggestions about openclassical - I am open to all feedback. I'm always thrilled when I hear that people find it useful.
  12. Hey webdesigner93 - thanks! Yes I built it myself from scratch. I started working on the site last summer, and since then it's been a cycle of design, then coding, then data curation, then user feedback. I've done quite a lot of C++ coding in the past, which helps a lot when shaping the backend php and so on.
  13. Hello! I'm David, based in NYC here in the states. I thought I'd sign up to these forums as it seems like an ideal place for me to share my work, and learn from others doing similar things. I'm a musician (classical pianist), and have learned quite a lot about computer science over the last years. My plan is coming together, and I have recently launched a website that aims to organize the great composers & their music, behind a simple interface. The goal of the site is to make classical music more accessible to the world at large. The site may be found at www.openclassical.com if anyone would like to take a look. I'm looking forward to exploring the forums here and interacting with you all.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.