Spark ML provides a higher-level API built on top of DataFrames for constructing ML pipelines. Basically, Spark ML provides you with a toolset to create pipelines of different machine learning related transformations on your data. It makes it easy to, for example, chain feature extraction, dimensionality reduction, and the training of a classifier into one model, which as a whole can be later used for classification. MLlib, however, is older and has been in development longer, it has more features because of this. Therefore, using Spark ML is recommended because, the API is more versatile and flexible with DataFrames.