Write Production Quality Cloud Functions (Firebase Dev Summit 2017)

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 35

  • @povic2057
    @povic2057 6 лет назад +17

    #AskFirebase Do you have recommendations on good tutorial on how to unit test functions locally

  • @ben6
    @ben6 4 года назад +1

    That logic at about 16:00 sounds like a very quick way to go out of business with cloud costs.

  • @federicomorenorodriguezcha7592
    @federicomorenorodriguezcha7592 7 лет назад +4

    #AskFirebase Hi! I tried to use async functions but does not compile base on that firebase cloud has Node version 6.x.. do you know when will be available Node version 8 in Google Functions?

    • @ThomasBouldin
      @ThomasBouldin 7 лет назад +2

      Version 8 will not come until after GA. This is why I demonstrated using TypeScript, which will let you use await/async early.

    • @AmarildoK
      @AmarildoK 6 лет назад

      When creating adding firebase functions to your project you should have an options to use to buildin process typescript => javascript

  • @merijnvanwouden
    @merijnvanwouden 6 лет назад +1

    I know I shouldn't ask this question here but I have been trying to get an answer from Google Cloud staff for months (literally) so this is my desperate attempt here:
    What is the ETA for Cloud Functions to be available in EU regions?

    • @qm3ster
      @qm3ster 5 лет назад +1

      There's eur3 multiregion now.

  • @qm3ster
    @qm3ster 5 лет назад +1

    const complex = () => task1()
    .then(task2)
    .then(task3)
    .then(errorHandler)
    Is technically shorter than
    async function complex() {
    try {
    const result1 = await task1();
    const result2 = await task2(result1);
    return task3(result2);
    } catch (err) {
    return errorHandler(err);
    }
    }
    All in all, `try/catch` of async is really dropping the ball.
    Can't wait for JavaScript to adopt a Result datatype.

  • @jguillendev
    @jguillendev 7 лет назад +1

    hello I love the ease of firebase functions, but I would like to be able to program anywhere I am and I have not found how to do it. They should have how to do this from an APP, or from the web. thus nothing would program the code, I give it to save and it should be published. Thank you

  • @deanjackson833
    @deanjackson833 5 лет назад

    If you organize your functions in folders like: users/addUser.js, users/renameUser.js, orders/addOrder.js, orders/search.js,
    can the URLs be made to include the folder name like: mybaseurl/users/addUser, mybaseurl/orders/search ?

  • @vangrails
    @vangrails 6 лет назад +1

    Async and Await in node.js. Does it work the same as in C#?

  • @planetmall2
    @planetmall2 5 лет назад

    Thank you for this presentation.

  • @the_tech_tube
    @the_tech_tube 7 лет назад +3

    Quality Presentation 👍

  • @HolyDropBear
    @HolyDropBear 6 лет назад +2

    Where can I get one of those blue Firebase shirts? :P

  • @razorgarf
    @razorgarf 6 лет назад +1

    I give you a second to take a photo of that D:

  • @bagoquarks
    @bagoquarks 6 лет назад

    FYI, 'Alone Together' is a 1970 album by Dave Mason. It's best known single is 'Only You Know and I Know'.

  • @aarongong6080
    @aarongong6080 7 лет назад +1

    when is async and await coming? i am currently using co...

    • @aarongong6080
      @aarongong6080 7 лет назад +1

      sorry I just saw Node 8 can be specified as the engine, so async and await should be there...

    • @mika2666
      @mika2666 7 лет назад +1

      You're in luck, node 8 just got LTS and all the features we've been waiting for are finally here :D
      except ES6 modules :(((((

    • @funkmafia05
      @funkmafia05 7 лет назад

      yes, but node 8.x not yet on servers - see here cloud.google.com/functions/docs/writing/

    • @chanlito4896
      @chanlito4896 7 лет назад +1

      it's in experimental stage, u can use a flag

    • @kamilwojtczyk2957
      @kamilwojtczyk2957 6 лет назад

      What's the flag? I can't find it anywhere.

  • @sreid70
    @sreid70 7 лет назад +10

    I'm not a fan of typescript. Tried using it with Angular 2-4 and became frustrated and went back to vanilla JS. Much happier and get more done.

    • @chanlito4896
      @chanlito4896 7 лет назад +3

      Lol the problem is not typescript, it's Angular. Trust me

    • @pierojoss
      @pierojoss 7 лет назад +3

      @sreid70 TS it's easy and powerful, and overall it's the future of the most popular frameworks in the market. Please consider to learn it, it's the best for your future.

    • @bangonkali
      @bangonkali 6 лет назад

      typescript is just an extension of the es6 or superset of es6, if you write es6 then that is valid typescript code since it is superset. typescript adds types and other checking. additionally it has a compiler which can compile back to es4,5, or 6. another alternative is flowjs which is compiled via babel and doesn't do anything fancy except being a typechecker. i think feature wise typescript as a language extension and the tooling around it provides more. but once again, vanilla js is legal ts code. angular is a whole another thing which is a ui framework to build SPA and other stuff with. people who use flowjs usually use react because both come from fb.
      your statement "went back to vanilla JS" essentially qualifies as simliar to writing TS since vanilla js is a subset of ts. which leads me to believe your issue maybe with angular.

  • @shawnlee6775
    @shawnlee6775 2 года назад

    I cant even use TypeScript...

  • @chadjones4255
    @chadjones4255 6 лет назад +1

    Yay Typescript, so all the code examples you find will not actually work. That was one of the great advantages of Coffeescript if I remember ancient history correctly. But this time it was invented by MS so surely it will not be a technological dead end. ;)

  • @Babakb
    @Babakb 6 лет назад

    The code at 13:05 mutates state and could mask bugs in more complex situations. Perhaps the observable pattern is a healthier approach (i.e., expand using RxJs). stackoverflow.com/questions/44097231/rxjs-while-loop-for-paging

  • @chanlito4896
    @chanlito4896 7 лет назад +1

    Hmm firebase team promoting console.log? 😄

    • @ThomasBouldin
      @ThomasBouldin 7 лет назад +4

      Among other tools that we've demonstrated in the past. E.g. errors with stacks are automatically aggregated into Stackdriver Error Reporting where you can see incidence rate and even set alerts with stackdriver alerting.

  • @d4lep0ro
    @d4lep0ro 6 лет назад

    Who keeps their backend code in one file, pelase provide real world examples

  • @hemanth6951
    @hemanth6951 7 лет назад +3

    google do not know presentation skills,like or dislike