Я должен записать свой собственный CMS?

Вы можете столкнуться с ситуацией, когда он ожидает завершения клипа, прежде чем отвечать на любые новые щелчки.

Если это так, вставьте этот код в начале вашей функции, чтобы сбросить клип каждый раз, когда по нему щелкают:

audio.currentTime = 0; // On each click, rewind clip to start

Это будет выглядеть примерно так:

if (playPromise !== undefined) {
    playPromise.then(function() {
    audio.currentTime = 0; // On each click, rewind clip to start
      // Automatic playback started!
    }).catch(function(error) {
      console.error("Sound was not played: " + error);
     });

Возможно, вы захотите изменить свой код, чтобы он стал чище. Я не проверял это, но все должно работать нормально:

const soundObject = document.querySelector("#newMessageSoundObjectId");

soundObject.addEventListener("mousedown", playClip);

function playClip() {
    audio.currentTime = 0; // On each click, rewind clip to start
    audio.play();
} else {
    console.error("Something went wrong");
7
задан 8 May 2009 в 22:36
поделиться

16 ответов

What you shall do is up to your own discretion, but what you should do is implement something like Drupal.

Drupal is a CMS which is intended to be used for community sites. It's not the easiest system to understand and use, but it's very customizable.

Here's some references that you could use to get started learning about Drupal: http://www.packtpub.com/drupal/book http://drupal.org/node/367131

Whenever you have to choose between writing something for yourself and using existing software there are four key pieces of information you need to account for.

  1. How Complex will it be?
  2. How closely does an existing system match my needs?
  3. What would it cost to implement an existing system Vs write your own
  4. How soon do I need it?

If it's not very complex, nothing else really matches your needs well, it would be cheap to create (in time and money) and you don't need it immediately then go ahead and do your own thing.

Otherwise, jump on board one of the existing open source CMS's and start contributing there. Not only will you get great feedback from experienced programmers, but you'll be part of some really awesome software.

6
ответ дан 6 December 2019 в 05:39
поделиться

It seems to me that these days successful community web sites are purpose-built. They don't have a lot of extraneous junk, are easy to navigate and are fun to use. StackOverflow is a good example here. For your web site to be successful your user interface will be very important.

If you want ultimate control over your user interface, then your best bet is to build it on your own. You can start with the code base of something that you like, or at least use it as a working example.

Fortunately, as long as you have reasonable programming skills to begin with the web tools that are available these days can make you very productive after a reasonable learning curve is surmounted.

At the end of the day, if you build it yourself, you'll have a web site that is very flexible, and looks exactly how you want it. If you use someone else's code, the you'll get the web site up faster and with more features, but it won't be as flexible and you'll probably have to make some concessions on look and feel.

0
ответ дан 6 December 2019 в 05:39
поделиться

To create something of the same quality as wordpress+mediawiki+some forum software would take many thousands of hours.

But if you're just building it for yourself to use, there are a lot of "good enoughs" you'll come across that'll save you time. So I would say... under 1,000 hours. That sounds kind of vague doesn't it? I've been programming 14 years and I'm still horrible at estimating time for projects, lol. Of course the definition of the project is pretty vague too.

To answer the question if it's worth it is really a question for yourself. If it's something you're excited about doing then it could be a great learning opportunity. About 7 years ago (before the days of Google Analytics) I wrote a fairly powerful web traffic tracking & statistics engine. It was a great learning experience for me and I don't regret doing it. Of course on the other hand, just like myself, you will be pouring a whole lot of work into something you'll have little chance of making any money from.

0
ответ дан 6 December 2019 в 05:39
поделиться

The how much time factor is impossible to answer, as we frankly, do not know how good you are or what resources you have. I will say though, every example you cited probably has atleast a thousand man hours behind it, and that is being very very conservative.

As to if you should develop your own? Well, that really depends what you want to accomplish. Want to be efficient in your usage of time? By all means, NO! Use a pre-existing solution. Want a case study to learn better programming? Thats a completely different scenario.

0
ответ дан 6 December 2019 в 05:39
поделиться

I think you'll find similar answers to Good resources for developing a Bug tracking tool?

As I said there, it really depends on your ultimate goal.

While I agree with what many have said already - why reinvent the wheel? - an answer that is going to be useful to you is going to depend on what you are trying to do.

Point #1:
If [you|your company] just need a CMS, there are numerous tools out there, free and otherwise, high quality and otherwise, why program your own?

Point #2:
If you are looking for a learning experience, looking for some something to learn [ChoiceLanguage] with, and/or just looking to learn more about wheels, there are a number of articles and there are a number of open source projects you can peek at the code to see how they work (or not as the case may be).

I've found that sometimes starting with an open source project helps me at least get a large chunk of code out of the way. I have taken a Classic ASP forum package and morphed it into a CMS - but it took a year or so and I was getting paid to do it. YMMV

In the end:
If the latter is your ultimate goal, then by all means, read the articles, do the research, and code away.

If its the former, you might want to look at something thats already been done - unless its going to be your businesses core competency.

Ultimately, the answer you get is going to depend on the question you ask. Being clear from the get-go will go a long way. ;)

0
ответ дан 6 December 2019 в 05:39
поделиться

If you want to go at it for the learning experience then I think you should. Phil Haack wrote a good blog post called Rolling Your Own Blog Engine with a good list of issues you'll run in to.

It's not as easy as many try to make it sound. The truth is that you can write a very minimal blog engine in a few hours (some will say minutes, but following along with the Rails video doesn't really count as your own development time), but it wouldn't be much use to anyone but yourself. Other users are going to demand more features.

Just make sure you leave yourself enough time to bail out and go with Plan B (wordpress+mediawiki+some forum software) if you need to.

0
ответ дан 6 December 2019 в 05:39
поделиться

Its possible in that time frame depending on how good you are with ruby on rails and php.

However, I would just use what's out there. Is it really worth all that time to make your own?

2
ответ дан 6 December 2019 в 05:39
поделиться

No.

"Don't Reinvent The Wheel, Unless You Plan on Learning More About Wheels".

I'd focus on learning about each of the tools and how you can integrate them together, instead of writing a CMS.

4
ответ дан 6 December 2019 в 05:39
поделиться

I'm in a somewhat similar situation, albeit at a smaller scale. I need a blog software in ,net, but the existing ones aren't really that good, so I've started my own. Here are my thoughts:

  1. Don't try to make 1:1 copies of something. Rolling your own gives you the chance to implement only what you need and leave out everything else.
  2. Start small. Wordpress and Mediawiki have years of coding behind them. Trying to duplicate that on your own is not going to work.
  3. Blogs and Forums are incredibly simple at first, but get incredibly complicated once you deal with stuff like WYSIWYG Editors, Anti-Spam techniques, Browser compatibility issues and the like.
  4. This is a great way to get serious experience with your language and "Enterprise" technologies, but if you're inexperienced and on a deadline, you're should really look at extending something already on the market first.

If you are willing to cut some corners at the beginning, I think that building a CMS in 300 hours is certainly feasible. But then don't start thinking about stuff like a Plugin Architecture, great User Experience for the Admin and Documentation - these points are really important if you want to release your CMS to other people, but not that much for internal use.

5
ответ дан 6 December 2019 в 05:39
поделиться

Judging from your goals it seems like it'd be easily accomplished in Drupal with minimal work.

www.drupal.org

Forums and user blogs are built in and I'm pretty sure I saw a wiki module somewhere.

However, if you're going for a learning experience - doing it yourself will be quite the learning experience. Whether you actually accomplish it or not you will understand RoR and/or PHP better by the time you're done.

7
ответ дан 6 December 2019 в 05:39
поделиться

roll out your own :)

you will gain experience (which is priceless), and on top of that you will end up with something thats not bloated...

7
ответ дан 6 December 2019 в 05:39
поделиться

I would say consider why you are doing it, if it's to further your knowledge of programming and learn something new then go for it and build it your self, otherwise I would just use available tools to put it together.

As for time frame? I am crap at estimation for my own skills, so have no chance of estimating yours :)

0
ответ дан 6 December 2019 в 05:39
поделиться

Вам не нужно заново изобретать колесо, чтобы получить опыт.

Я бы выбрал Wordpress. Я использую его на своем веб-сайте (www.norwegianfashion.no) и считаю, что у меня довольно продвинутый веб-сайт. Я, безусловно, улучшил свои навыки программирования на PHP.

Я тоже пытался разобраться в Drupal. Это очень хорошая CMS, но учить ее - заноза в заднице.

Даже после 5 лет разработки на других системах CMS (.NET) я не смог освоить Drupal после 1 месяца попыток.

Я Я не заядлый программист, но считаю, что CMS должна быть довольно простой в использовании.

Итак, я выбрал Wordpress. У него есть ограничения, но вы можете создать свои собственные плагины, чтобы компенсировать это.

0
ответ дан 6 December 2019 в 05:39
поделиться

Я бы сам выбрал WordPress в рамках проекта, который вы определили. Simple Press Forum - это надежный полнофункциональный плагин форума для WordPress, в который довольно легко интегрировать MediaWiki. Также существует проект плагина для вики-сайтов WordPress, который может использовать часы, которые, как кажется, вы готовы совершить. WordPress может делать все, что вы описали, за выходные.

0
ответ дан 6 December 2019 в 05:39
поделиться

Я должен подчеркнуть замечание barfoon, чтобы не изобретать велосипед. Есть много полезного опыта, который можно получить, взяв чужую CMS и научившись использовать и развиваться против нее.

Кроме того, вы многому научитесь, если возьмете проект с открытым исходным кодом и просмотрите, как они решили разработать свой продукт. Затем , поняв, как они работают, вы можете внести свой вклад в проект или даже расширить его самостоятельно, но у этого способа есть несколько преимуществ:

  • Вы знаете, во что ввязываетесь (CMS может быть большой задачей)
  • В зависимости от того, что вы выберете, там ' значительная поддержка сообществом существующих продуктов CMS, что очень ценно
  • Вы, вероятно, научитесь хорошему подходу, увидев их код
  • Изучение их продукта / кода занимает меньше времени, чем создание собственного, поэтому вы с меньшей вероятностью потерять мотивацию, чем если бы вы начали строить его с нуля

Тем не менее, я лично рекомендую вам взглянуть на Magnolia . Он пользуется поддержкой сообщества, это открытый исходный код и система качества.

G'luck

0
ответ дан 6 December 2019 в 05:39
поделиться

Как истинный разработчик, вы будете иметь желание большого количества настроек. Многие предварительно упакованные CMS / блоги имеют системы плагинов, но мне все они кажутся немного странными, когда мне приходится регистрировать свой код в системе через запись в базе данных.

Если честно, у меня был свой блог. в wordpress, переписал свой собственный на PHP, и с тех пор я дважды переписал его в Django.

Каждый раз становится быстрее, каждый раз, когда вы хотите сделать что-то еще, и каждый раз, когда вы изучаете все удобство использования и безопасность проблемы, которые должны пройти люди, создавшие очень большие проекты.

Переписывание было ценным опытом, и я никогда не стал бы использовать аргумент «Не изобретайте велосипед». Я чувствую, что могу посмотреть на колесо и сказать, что с ним не так,

3
ответ дан 6 December 2019 в 05:39
поделиться
Другие вопросы по тегам:

Похожие вопросы: